subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Hartman <hartman.nat...@gmail.com>
Subject Issue tracker housecleaning: SVN-1722
Date Mon, 14 Oct 2019 20:09:07 GMT
A short time ago, in a galaxy nearby... or, in the thread
"Fwd: PMCs: any Hackathon requests? (deadline 11 October)"...

Julian Foad wrote:
>> Nathan Hartman wrote:
>> https://issues.apache.org/jira/browse/SVN-1722 "svn
>> diff may missreport a revision as the working copy."
>
> Errm... last reviewed 9 years ago.  Is it really what it says it is?
>
> Sadly, we have hundreds of unreviewed (or not recently reviewed) open
> issues.  Some are misleadingly labeled "bite-sized" but are really
> symptoms of deeper problems.  Can we take this opportunity to do
> something about that?  Like, maybe start bringing one old issue to the
> dev list for review each week?

I later said I would bring one issue to the list for review each week.
So here's the first one... SVN-1722 is as good a candidate as any.

Summary: I think this issue should be closed.

It looks as though this issue was fixed somewhere between 1.8.19 and
1.12.2.

I think the issue tracker was not updated because the fix might have
occurred as part of other refactorings or new features in the code.

In 2004, when the issue was opened, it was reported that the problem
manifest when svn diff was run with the following arguments in the
reproduction script:

+ svn diff -r BASE:HEAD
+ svn diff -r HEAD:BASE
+ svn diff -r HEAD
+ svn diff -r 0:HEAD
+ svn diff -r 1

Later, in 2010, C. Michael Pilato commented in the issue tracker and
showed one form that was fixed and another that that was still broken.
The correct form was output by:

+ svn diff -r BASE:HEAD

The broken form was still being output by:

+ svn diff -r HEAD:BASE

I ran the reproduction script against 1.8.19 and against 1.12.2
(respectively the oldest and newest installed versions I happen to
have at the moment):

When run against 1.8.19, the following forms produce the broken output:

+ svn diff -r HEAD:BASE
+ svn diff -r HEAD
+ svn diff -r 1

When run against 1.12.2, all of the forms appear correct.

I did not setup and run a bisect to find the exact commit where the
issue gets fixed, but some manual investigation turned up this very
promising-looking candidate:

r1570053

and these slightly less-promising-looking ones:

r1619452
r1570266

The reproduction script (copied from issue tracker):

$ cat runtest
rm -rf repo test test2
svnadmin create repo
svn checkout file:///`pwd`/repo test
svn checkout file:///`pwd`/repo test2
cd test
echo "test" >file
svn add file
svn -m test commit
cd ../test2
svn diff -r BASE:HEAD
svn diff -r HEAD:BASE
svn diff -r BASE
svn diff -r HEAD
svn diff -r 0:BASE
svn diff -r 0:HEAD
svn diff -r 0:1
svn diff -r 1:0
svn diff -r 0
svn diff -r 1

Following is the output when run against 1.8.19; note the incorrect
"working copy" labels when -r is HEAD:BASE, HEAD, and 1:

$ sh -x runtest
+ rm -rf repo test test2
+ svnadmin create repo
++ pwd
+ svn checkout file:////Users/nate/mount/ramdrive/test/repo test
Checked out revision 0.
++ pwd
+ svn checkout file:////Users/nate/mount/ramdrive/test/repo test2
Checked out revision 0.
+ cd test
+ echo test
+ svn add file
A         file
+ svn -m test commit
Adding         file
Transmitting file data .
Committed revision 1.
+ cd ../test2
+ svn diff -r BASE:HEAD
Index: file
===================================================================
--- file (revision 0)
+++ file (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r HEAD:BASE
Index: file
===================================================================
--- file (revision 1)
+++ file (working copy)
@@ -1 +0,0 @@
-test
+ svn diff -r BASE
+ svn diff -r HEAD
Index: file
===================================================================
--- file (revision 1)
+++ file (working copy)
@@ -1 +0,0 @@
-test
+ svn diff -r 0:BASE
+ svn diff -r 0:HEAD
Index: file
===================================================================
--- file (revision 0)
+++ file (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r 0:1
Index: file
===================================================================
--- file (revision 0)
+++ file (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r 1:0
Index: file
===================================================================
--- file (revision 1)
+++ file (revision 0)
@@ -1 +0,0 @@
-test
+ svn diff -r 0
+ svn diff -r 1
Index: file
===================================================================
--- file (revision 1)
+++ file (working copy)
@@ -1 +0,0 @@
-test
$

Following is the output when run against 1.12.2:

$ sh -x runtest
+ rm -rf repo test test2
+ svnadmin create repo
+ pwd
+ svn checkout file:////home/nate/ramdrive/test/repo test
Checked out revision 0.
+ pwd
+ svn checkout file:////home/nate/ramdrive/test/repo test2
Checked out revision 0.
+ cd test
+ echo test
+ svn add file
A         file
+ svn -m test commit
Adding         file
Transmitting file data .done
Committing transaction...
Committed revision 1.
+ cd ../test2
+ svn diff -r BASE:HEAD
Index: file
===================================================================
--- file        (nonexistent)
+++ file        (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r HEAD:BASE
Index: file
===================================================================
--- file        (revision 1)
+++ file        (nonexistent)
@@ -1 +0,0 @@
-test
+ svn diff -r BASE
+ svn diff -r HEAD
Index: file
===================================================================
--- file        (revision 1)
+++ file        (nonexistent)
@@ -1 +0,0 @@
-test
+ svn diff -r 0:BASE
+ svn diff -r 0:HEAD
Index: file
===================================================================
--- file        (nonexistent)
+++ file        (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r 0:1
Index: file
===================================================================
--- file        (nonexistent)
+++ file        (revision 1)
@@ -0,0 +1 @@
+test
+ svn diff -r 1:0
Index: file
===================================================================
--- file        (revision 1)
+++ file        (nonexistent)
@@ -1 +0,0 @@
-test
+ svn diff -r 0
+ svn diff -r 1
Index: file
===================================================================
--- file        (revision 1)
+++ file        (nonexistent)
@@ -1 +0,0 @@
-test
$

Thoughts?
Nathan

Mime
View raw message