You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Harrigan <da...@hpi.co.uk> on 2004/03/23 09:50:24 UTC
Diffing Question
Hi,
I'm trying to get my head around diffing in subversion. Let me set the
scenario.
One repo called test that has a directory called src. It has two files
TestA.java and TestB.java. My repo is organised as this:-
test
|
+---- trunk
| +----src
| +--- TestA.java
| +--- TestB.java
+---- branches
| +----2004-03-22
| +--- TestA.java
| +--- TestB.java
I've svn co'ed out the trunk to a directory called test and svn co'ed
out the 2004 branch to a directory called anothertest. TestA.java on the
trunk is at revision 4 and TestA.java on the branch is at revision 10
(there are a few additional lines in TestA.java on the branch).
Now, if I'm in the trunk and in the src directory, I would have expected:
svn diff -r4:10 TestA.java
http://localhost/repos/test/branches/2004-03-22/TestA.java
to return to me the diffs between my trunk TestA.java revision and my
branch TestA.java revision. However it doesn't. Instead I get this message:
svn: 'http://localhost/repos/test/branches/2004-03-22/src/TestA.java'
was not found in the repository at revision 4
I can confirm that there is a revision of TestA.java at revision 4 in
both the trunk and branch.
In order to do what I want it to do, I have to provide the fully
qualified URL:
svn diff -r4:10 http://localhost/repos/test/trunk/TestA.java
http://localhost/repos/test/branches/2004-03-22/TestA.java
This to me doesn't make sense. I think svn should know that I'm in the
trunk directory and do the diff between what is my local copy on my
machine to what I've stipulated as the branch URL.
Am I getting this totally wrong? I hope I'm explaining myself well
enough, but if not then please ask.
-=david=-
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Diffing Question
Posted by Stuart Robertson <do...@absolutesys.com>.
> Basically, a whole bunch of svn commands should be smart enough to
> follow history... but only 'svn log' actually does it. For example, if
> I run 'svn diff -r X:Y URL', and the URL@Y happens to have been copied
> from a different location, the diff command should be able to
> automatically discover the oldURL@X, and then compare the two different
> URLs.
Any ideas what the timeline might be for the "smart" svn commands?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Diffing Question
Posted by Ben Collins-Sussman <su...@collab.net>.
David Harrigan wrote:
> Am I getting this totally wrong? I hope I'm explaining myself well
> enough, but if not then please ask.
You're not wrong; you've just discovered one of the big "annoyances" on
the svn 1.1 hit-list.
Basically, a whole bunch of svn commands should be smart enough to
follow history... but only 'svn log' actually does it. For example, if
I run 'svn diff -r X:Y URL', and the URL@Y happens to have been copied
from a different location, the diff command should be able to
automatically discover the oldURL@X, and then compare the two different
URLs.
The workaround for now is that *you* have to discover the old location
(via 'svn log -v'), and then run
svn diff URL1@X URL2@Y
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org