Svn get current user

前端 未结 8 1644
旧时难觅i
旧时难觅i 2021-02-05 01:47

How to get current user that is using svn on particular workstation?

can I use svn.exe executable with some switch to get that info.

Thanks.

8条回答
  •  伪装坚强ぢ
    2021-02-05 02:42

    grep username ~/.subversion/auth/svn.simple/* --after-context=2 | tail -1
    

    Explanation:

    1. Grep the file in grep username ~/.subversion/auth/svn.simple/* will look for username

    2. --after-context=2 will print +2 line after it encounters username

    Output:

    username
    V 6
    Bhavik
    
    1. To print only the username
      use | tail -1 will give me my username i.e Bhavik.

    Hope this explains the code.

提交回复
热议问题