[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] Get username from SvnClientAdapter

From: Mark Phippard <mphippard_at_collab.net>
Date: Tue, 16 Dec 2008 14:22:19 -0500

On Tue, Dec 2, 2008 at 2:57 PM, Christoph Mayerhofer
<christoph.mayerhofer_at_gmx.at> wrote:

> I'm developing an Eclipse plug-in on top of Subclipse. I want to query the username of the connection to the repository. I tried it with the following:
>
> SVNTeamProvider teamProvider = (SVNTeamProvider) RepositoryProvider.getProvider(project, getTypeId());
> ...
> ISVNRepositoryLocation location = teamProvider.getSVNWorkspaceRoot().getRepository();
> location.getUsername()
>
> But the username is empty. I think it's because user/passwort credentials are cached from the svn client (JavaHL, SVNKit), so the information is not available.
>
> Is it somehow possible to get the username used for the svn connection?

I do not believe it is possible. You do not provide credentials to
SVN, it asks for them when it needs them. I cannot think of any place
where you could then query what it used.

The value you were retrieving is a holdover to an early version of
Subclipse where you had to specify your credentials for each
repository location. This was removed before 1.0 but some of the code
was left in for backwards compat.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1043&dsMessageId=985182
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_subclipse.tigris.org].
Received on 2008-12-16 20:22:33 CET

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.