Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Svn get current user

Tags:

svn

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.

like image 766
Irfan Mulic Avatar asked Jan 07 '10 19:01

Irfan Mulic


2 Answers

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.

like image 22
Bhavik Bhavsar Avatar answered Sep 27 '22 21:09

Bhavik Bhavsar


In Linux, you will find the following file in your home directory:

~/.subversion/auth/svn.simple

In this file, you can see the "currently logged in user".

like image 113
gimpe Avatar answered Sep 27 '22 19:09

gimpe