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

Re: query for the root of the working directory?

From: Carsten Koch <Carsten.Koch_at_icem.com>
Date: 2006-01-11 19:49:11 CET

Nathan Lewis wrote:
> Is there a way in subversion to get the root of the working copy?

You should be able to do that with a few lines of shell
or python code.
"svn info" gives you the URL of the current working
directory like this:
URL: http://server/repos/top-dir/second-dir/third-dir

After a "cd .." this should be:
URL: http://server/repos/top-dir/second-dir


Just keep doing "cd .." until the URL returned is not
the previous URL without the last element.
Then go back down one level to the previous wd.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 11 20:01:47 2006

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.