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

"svn diff -cN filename" fails when "N" is when "filename" was added

From: Leo Moisio <leo.moisio_at_gmail.com>
Date: Tue, 22 Jul 2008 15:20:25 +0300

When I do
"svn di -cN filename"
I get an error:
"svn: Unable to find repository location for 'filename' in revision M"
where M is N-1, if "filename" was added in revision N.

However if I just do
"svn di -cN" I
can see the added file as a diff.

When the revision N contains changes to many files, and I would just
like to see the diff for "filename" that was added in that commit, I
have to use "svn cat -rN filename" instead.

Wouldn't it make more sense to check if the requested filename is in
either revision, instead of both, and if it does indeed exist in one
of them, show the diff regarding that file just as svn di does when
the filename is not given on the command line. Should this be changed?

Below is an example run showing this behaviour.

Leo Moisio

$ svnadmin create /tmp/foo-repo
$ svn checkout file:///tmp/foo-repo /tmp/foo-wc
Checked out revision 0.
$ cd /tmp/foo-wc/
$ echo "contents of file a" > a
$ svn add a
A a
$ svn commit -m "added file a"
Adding a
Transmitting file data .
Committed revision 1.
$ echo "contents of file b" > b
$ svn add b
A b
$ svn commit -m "added file b"
Adding b
Transmitting file data .
Committed revision 2.
$ svn up
At revision 2.
$ svn log
------------------------------------------------------------------------
r2 | semi | 2008-07-22 15:09:12 +0300 (Tue, 22 Jul 2008) | 1 line

added file b
------------------------------------------------------------------------
r1 | semi | 2008-07-22 15:08:44 +0300 (Tue, 22 Jul 2008) | 1 line

added file a
------------------------------------------------------------------------
$ svn di -c1
Index: a
===================================================================
--- a (revision 0)
+++ a (revision 1)
@@ -0,0 +1 @@
+contents of file a
$ svn di -c1 a
svn: Unable to find repository location for 'a' in revision 0
$ svn di -c2
Index: b
===================================================================
--- b (revision 0)
+++ b (revision 2)
@@ -0,0 +1 @@
+contents of file b
$ svn di -c2 b
svn: Unable to find repository location for 'b' in revision 1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-22 17:41:02 CEST

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.