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

svn - one realmstring and multiple usernames

From: Jim Thompson <jfthomps_at_wisc.edu>
Date: Fri, 05 Mar 2010 12:07:47 -0600

Greetings!

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

Either:
username
V 26
role_StudentAdmin_trantest

Or:
username
V 30
role_StudentAdmin-cfg_trantest

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)

I see in the book:
http://svnbook.red-bean.com/nightly/en/svn.serverconfig.netmodel.html#svn.serverconfig.netmodel.credcache

"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?

Thanks,
Jim
Received on 2010-03-05 19:17:07 CET

This is an archived mail posted to the Subversion Users mailing list.

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