svn - one realmstring and multiple usernames
From: Jim Thompson <jfthomps_at_wisc.edu>
Date: Fri, 05 Mar 2010 12:07:47 -0600
There may be only one answer, but I'll describe my challenge in case someone has a better alternative.
I want to run a script (e.g., from cron and/or launched by a CI tool like Hudson) which runs some svn commands. The tricky part is that the script may run svn commands using two repositories. In my case, the username (and password) will be different in the two repos, but they have the same realmstring.
Here are examples of what I see in ~trantest/.subversion/auth/svn.simple/xxxxxxx
The trick is that the value of svn:realmstring remains the same... So whichever repo I last accessed (via a command line like: svn ls https://... --username xxxx --password xxxx) has those credentials overwrite the contents of the file (~trantest/.subversion/auth/svn.simple/xxxxxxx)
"Credentials are cached in individual files; if you look inside each file, you will see keys and values. The svn:realmstringkey describes the particular server realm that the file is associated with"
It seems like we need a different realmstring available for one of the repos, in order to get two files generated and saved in ~trantest/.subversion/auth/svn.simple
I'm not seeing another approach that will let my script access both repos, unless I change the script to provide --username and --password for each call (very nasty). Any other ideas?
This is an archived mail posted to the Subversion Users mailing list.