Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Hot to get a username
Hot to get a username [message #675381] Tue, 31 May 2011 06:49 Go to next message
Eugene   is currently offline Eugene
Messages: 26
Registered: July 2009
Junior Member
Hi,
Is there any extension point or some other way to get a username used to access svn repo?

Best regards, Eugene.
Re: Hot to get a username [message #675669 is a reply to message #675381] Wed, 01 June 2011 03:25 Go to previous messageGo to next message
Eugene   is currently offline Eugene
Messages: 26
Registered: July 2009
Junior Member
Ok, i found

String username = SVNRemoteStorage.instance().getRepositoryLocation(((IFileEditorInput) input).getFile()).getUsername();

but it works randomly, returning either "" or username. Does anybody know why?

Best regards, Eugene.
Re: Hot to get a username [message #675696 is a reply to message #675669] Wed, 01 June 2011 04:35 Go to previous message
Eugene   is currently offline Eugene
Messages: 26
Registered: July 2009
Junior Member
So far i can see that there is a cycle in SVNRepositoryLocation.checkAuthInfo
      SVNRemoteStorage.instance().loadAuthInfo(this, ""); //loads empty username
      for (String realm : this.rawRealms) {
         SVNRemoteStorage.instance().loadAuthInfo(this, realm);//loads correct username
      }


but correct username ends up in location.addRealm(realm, tmp); (the very end of AbstractSVNStorage.loadAuthInfoFromSecureStorage) and i can't find how to get it out from there. So the question is what those realms are? It looks like some id after location: 8f965d19-5de2-4eab-982b-236986040a72 .

Best regards, Eugene.

[Updated on: Wed, 01 June 2011 04:36]

Report message to a moderator

Previous Topic:Install subversive from the command line
Next Topic:CVS Watch/Edit equivalent?
Goto Forum:
  


Current Time: Sat Apr 19 16:11:43 EDT 2014

Powered by FUDForum. Page generated in 0.01588 seconds