Hello,

User name (actually any credentials being used when connecting to
repository) is not stored in the working copy.

Subversion maintains so called credentials cache on disk, by default
at ~/.subversion/auth directory on Linux and OS X and at
%APP_DATA%/Subversion/auth on Windows.

Credentials to be used are selected by repository URL or realm string
in case latter is provided (it may has any value, but default is
composed the way you do in your example). When there are no
credentials found in cache, then Subversion prompts user for them and
stores them after connection is acknowledged by server (and
configuration allows credentials storage).

With SVNKit it is also possible to implement custom
ISVNAuthenticationManager and manage credentials in way one likes.

Alexander Kitaev,
TMate Software,
http://subgit.com/ - Svn to Git Migration!
http://svnkit.com/ - Java [Sub]Versioning Library!
http://hg4j.com/ - Java Mercurial Library!
http://sqljet.com/ - Java SQLite Library!


On 20 July 2012 16:12, jruhe <julian.ruhe+n...@googlemail.com> wrote:
>
> I could not find out a simple way to determine the user name associated with
> the repository of my wc.
>
> The ugly way I do it looks like this:
>
> String realm = "<" + url1.getProtocol() + "://" + url1.getHost() + ":" +
> url1.getPort() + "> " + uuid;
> final SVNClientManager clientManager = SVNClientManager.newInstance(new
> DefaultSVNOptions());
> final SVNAuthentication auth =
> clientManager.getWCClient().getOperationsFactory().getAuthenticationManager()
>                                         
> .getFirstAuthentication(ISVNAuthenticationManager.USERNAME, realm,
> url);
>
> Any other and better idea? Thank you.
>
> jruhe
> --
> View this message in context: 
> http://old.nabble.com/Looking-for-a-simple-way-to-find-out-user-name-from-wc-tp34190078p34190078.html
> Sent from the SVNKit - Users mailing list archive at Nabble.com.
>
>

Reply via email to