You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jim Thompson <ji...@doit.wisc.edu> on 2007/01/25 22:45:55 UTC
svn diff - unexpected results
This appears to either be a bug or a feature that's less than obvious to
me.
Running Subversion 1.3.0 on Linux - Red Hat AS release 4.
In a directory on the trunk, created 3 files:
- part1.txt
- part2.txt
- part3.txt
Committed and created a tag...
Then, in the same directory on the trunk:
- removed part1.txt
- added part4.txt
Committed and created another tag.
Now, when I use "svn diff" for the two tags...
1) diff older and newer tags.
svn diff .../tags/rel_20070124_1835 .../tags/rel_20070124_1842
Index: part1.txt
===================================================================
--- part1.txt (.../rel_20070124_1835) (revision 1661)
+++ part1.txt (.../rel_20070124_1842) (revision 1661)
@@ -1 +0,0 @@
-This is part 1 of portlet2a
...
Index: part4.txt
===================================================================
--- part4.txt (.../rel_20070124_1835) (revision 0)
+++ part4.txt (.../rel_20070124_1842) (revision 1661)
@@ -0,0 +1,2 @@
+This is part 4 of portlet2a
+It replaces part1, which was deleted.
= = = = = = = = = = = = = = = = = = = =
2) diff newer and older tags (reversed order of diff).
svn diff .../tags/rel_20070124_1842 .../tags/rel_20070124_1835
Index: part4.txt
===================================================================
--- part4.txt (.../rel_20070124_1842) (revision 1661)
+++ part4.txt (.../rel_20070124_1835) (revision 1661)
@@ -1,2 +0,0 @@
-This is part 4 of portlet2a
-It replaces part1, which was deleted.
Index: part1.txt
===================================================================
--- part1.txt (.../rel_20070124_1842) (revision 0)
+++ part1.txt (.../rel_20070124_1835) (revision 1661)
@@ -0,0 +1 @@
+This is part 1 of portlet2a
Index: part2.txt
My questions:
1) What's up with "revision 0" ?
It only shows when the file in question doesn't exist in the first tag
compared.
When the file doesn't exist in the second tag, shouldn't it be shown as
"revision 0"?
2) What's up with "revision 1661"?
This is the latest rev number in the repo. It's not when either tag was
committed. Each time I run a diff, the latest rev number shows up.
Shouldn't these be something more useful, like the revs when each tag
was committed (if the file exists with that tag)?
Comments?
Thanks,
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn diff - unexpected results
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 25, 2007, at 16:45, Jim Thompson wrote:
> 1) diff older and newer tags.
> svn diff .../tags/rel_20070124_1835 .../tags/rel_20070124_1842
> Index: part1.txt
> ===================================================================
> --- part1.txt (.../rel_20070124_1835) (revision 1661)
> +++ part1.txt (.../rel_20070124_1842) (revision 1661)
> @@ -1 +0,0 @@
> -This is part 1 of portlet2a
> ...
> Index: part4.txt
> ===================================================================
> --- part4.txt (.../rel_20070124_1835) (revision 0)
> +++ part4.txt (.../rel_20070124_1842) (revision 1661)
> @@ -0,0 +1,2 @@
> +This is part 4 of portlet2a
> +It replaces part1, which was deleted.
>
> = = = = = = = = = = = = = = = = = = = =
>
> 2) diff newer and older tags (reversed order of diff).
> svn diff .../tags/rel_20070124_1842 .../tags/rel_20070124_1835
> Index: part4.txt
> ===================================================================
> --- part4.txt (.../rel_20070124_1842) (revision 1661)
> +++ part4.txt (.../rel_20070124_1835) (revision 1661)
> @@ -1,2 +0,0 @@
> -This is part 4 of portlet2a
> -It replaces part1, which was deleted.
> Index: part1.txt
> ===================================================================
> --- part1.txt (.../rel_20070124_1842) (revision 0)
> +++ part1.txt (.../rel_20070124_1835) (revision 1661)
> @@ -0,0 +1 @@
> +This is part 1 of portlet2a
> Index: part2.txt
>
> My questions:
>
> 1) What's up with "revision 0" ?
> It only shows when the file in question doesn't exist in the first
> tag compared.
> When the file doesn't exist in the second tag, shouldn't it be
> shown as "revision 0"?
I'm afraid I don't know the answer here.
> 2) What's up with "revision 1661"?
> This is the latest rev number in the repo. It's not when either
> tag was committed. Each time I run a diff, the latest rev number
> shows up. Shouldn't these be something more useful, like the revs
> when each tag was committed (if the file exists with that tag)?
Intended behavior. You did not specify a revision number in your diff
command, therefore you are getting the HEAD revision, which is
currently 1661. In revision 1661, your tags do indeed look the way
Subversion has shown. The fact that a particular tag was last changed
at a different prior revision is a different question, and can be
asked in a different way (for example, "svn info url://to/your/tag"
and examine the "Last Changed Revision" line).
--
To reply to the mailing list, please use your mailer's Reply To All
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org