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

Re: svn diff doesn't include repository path of changed files

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2003-08-19 03:24:07 CEST

At 10:34 AM +1000 8/19/03, David Sitsky wrote:
>When a Codestriker topic is created, the repository that the code review
>has been made against needs to be nominated, in this case, it would be
>http://host/svn/jrepenning.

That is not necessarily true; does this matter for your purposes?
SVN does not enforce any rules about where in the path "the
repository root" appears. You have correctly spotted the spot where
I happen to have my repo root, but there's at least one other common
convention that this identical URL could represent:

repo: http://host/svn/
project: jrepenning/
stuff in project: trunk/home/.bashrc

Indeed, as far as SVN is concerned, "trunk" might be the repo root,
or even lower; it is only a human convention that this be the name of
the directory containing the latest versions.

>If the diff file contained in this instance,
>http://host/svn/jrepenning/trunk/home/.bashrc in the Index: line, we could
>determine what the file's relative path in the repository is. Then in the
>main Codestriker GUI, the file's full contents could be retrieved directly
>using svn commands, as all the information required to do this is
>available (the revision number is also extracted).

You don't need to monkey with that URL in any way (and you don't need
to solve the impossible problem of where the repo root starts) in
order to do this. just use the URL. This is different (and, I
think, just a teeny bit easier) than CVS, where the first term or two
of path, and the trailing ",v", need to be shaved.

So if your program only wants to do the things you've mentioned, then
just use the URL (we still have open your wish that the URL should be
in the diff output, of course).

And if humans need to look at the string and know where the repo root
is, that's OK, too--they'll know these things.

But if your *code* needs to figure it out, you may have to use the SVN API's.

-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 19 03:24:58 2003

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