You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2009/10/18 19:12:43 UTC
more wc-ng node revision differences that affect 'svn diff'
Hey,
The patch below results in test failures, as shown below.
Like other failures I've seen, the tests fail because revisions
reported by wc-ng for added or deleted nodes don't match up with
what wc-1 reported.
Can someone explain the rationale behind these differences?
Should I simply adjust the expected output or do these tests failures
exhibit undesired behaviour?
Thanks,
Stefan
[[[
* subversion/libsvn_wc/diff.c
(report_wc_file_as_added): Stop using svn_wc_entry_t, and use WC-NG
APIs instead. This function no longer takes an ENTRY parameter.
(report_wc_directory_as_added, delete_entry): Track parameter removal.
]]]
Index: subversion/libsvn_wc/diff.c
===================================================================
--- subversion/libsvn_wc/diff.c (revision 40094)
+++ subversion/libsvn_wc/diff.c (working copy)
@@ -909,15 +909,13 @@ directory_elements_diff(struct dir_baton *db)
* as having been added.
*
* DIR_BATON is the parent directory baton, ADM_ACCESS/PATH is the path
- * to the file to be compared. ENTRY is the working copy entry for
- * the file.
+ * to the file to be compared.
*
* Do all allocation in POOL.
*/
static svn_error_t *
report_wc_file_as_added(struct dir_baton *db,
const char *path,
- const svn_wc_entry_t *entry,
apr_pool_t *pool)
{
struct edit_baton *eb = db->eb;
@@ -929,6 +927,8 @@ report_wc_file_as_added(struct dir_baton *db,
const char *source_file;
const char *translated_file;
const char *local_abspath;
+ svn_wc__db_status_t status;
+ svn_revnum_t revision;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
@@ -939,14 +939,25 @@ report_wc_file_as_added(struct dir_baton *db,
SVN_ERR(get_empty_file(eb, &empty_file));
+ SVN_ERR(svn_wc__db_read_info(&status, &revision, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, eb->db, local_abspath,
+ pool, pool));
+
+ if (status == svn_wc__db_status_added)
+ SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, eb->db, local_abspath,
+ pool, pool));
+
/* We can't show additions for files that don't exist. */
- SVN_ERR_ASSERT(!(entry->schedule == svn_wc_schedule_delete
- && !eb->use_text_base));
+ SVN_ERR_ASSERT(status != svn_wc__db_status_deleted || eb->use_text_base);
/* If the file was added *with history*, then we don't want to
see a comparison to the empty file; we want the usual working
vs. text-base comparison. */
- if (entry->copied)
+ if (status == svn_wc__db_status_copied ||
+ status == svn_wc__db_status_moved_here)
{
/* Don't show anything if we're comparing to BASE, since by
definition there can't be any local modifications. */
@@ -985,7 +996,7 @@ report_wc_file_as_added(struct dir_baton *db,
NULL, NULL, NULL,
path,
empty_file, translated_file,
- 0, entry->revision,
+ 0, revision,
NULL, mimetype,
NULL, SVN_INVALID_REVNUM,
propchanges, emptyprops,
@@ -1083,7 +1094,7 @@ report_wc_directory_as_added(struct dir_baton *db,
switch (entry->kind)
{
case svn_node_file:
- SVN_ERR(report_wc_file_as_added(db, path, entry, iterpool));
+ SVN_ERR(report_wc_file_as_added(db, path, iterpool));
break;
case svn_node_dir:
@@ -1217,7 +1228,7 @@ delete_entry(const char *path,
else
{
/* Or normally, show the working file being added. */
- SVN_ERR(report_wc_file_as_added(pb, full_path, entry, pool));
+ SVN_ERR(report_wc_file_as_added(pb, full_path, pool));
}
break;
case svn_node_dir:
$ ./diff_tests.py --verbose 27 32 34
CMD: svnadmin create svn-test-work/local_tmp/repos --bdb-txn-nosync
<TIME = 0.321006>
CMD: svn import -m "Log message for revision 1." svn-test-work/local_tmp/greekfiles file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/repos --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.698658>
Adding svn-test-work/local_tmp/greekfiles/A
Adding svn-test-work/local_tmp/greekfiles/A/B
Adding svn-test-work/local_tmp/greekfiles/A/B/lambda
Adding svn-test-work/local_tmp/greekfiles/A/B/E
Adding svn-test-work/local_tmp/greekfiles/A/B/E/alpha
Adding svn-test-work/local_tmp/greekfiles/A/B/E/beta
Adding svn-test-work/local_tmp/greekfiles/A/B/F
Adding svn-test-work/local_tmp/greekfiles/A/mu
Adding svn-test-work/local_tmp/greekfiles/A/C
Adding svn-test-work/local_tmp/greekfiles/A/D
Adding svn-test-work/local_tmp/greekfiles/A/D/gamma
Adding svn-test-work/local_tmp/greekfiles/A/D/G
Adding svn-test-work/local_tmp/greekfiles/A/D/G/rho
Adding svn-test-work/local_tmp/greekfiles/A/D/G/pi
Adding svn-test-work/local_tmp/greekfiles/A/D/G/tau
Adding svn-test-work/local_tmp/greekfiles/A/D/H
Adding svn-test-work/local_tmp/greekfiles/A/D/H/chi
Adding svn-test-work/local_tmp/greekfiles/A/D/H/omega
Adding svn-test-work/local_tmp/greekfiles/A/D/H/psi
Adding svn-test-work/local_tmp/greekfiles/iota
Committed revision 1.
CMD: svnadmin create svn-test-work/repositories/diff_tests-27 --bdb-txn-nosync
<TIME = 0.370442>
CMD: svnadmin dump svn-test-work/local_tmp/repos | svnadmin load svn-test-work/repositories/diff_tests-27 --ignore-uuid
<TIME = 0.454504>
CMD: svn co file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/repositories/diff_tests-27 svn-test-work/working_copies/diff_tests-27 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 1.107292>
A svn-test-work/working_copies/diff_tests-27/A
A svn-test-work/working_copies/diff_tests-27/A/B
A svn-test-work/working_copies/diff_tests-27/A/B/lambda
A svn-test-work/working_copies/diff_tests-27/A/B/E
A svn-test-work/working_copies/diff_tests-27/A/B/E/alpha
A svn-test-work/working_copies/diff_tests-27/A/B/E/beta
A svn-test-work/working_copies/diff_tests-27/A/B/F
A svn-test-work/working_copies/diff_tests-27/A/mu
A svn-test-work/working_copies/diff_tests-27/A/C
A svn-test-work/working_copies/diff_tests-27/A/D
A svn-test-work/working_copies/diff_tests-27/A/D/gamma
A svn-test-work/working_copies/diff_tests-27/A/D/G
A svn-test-work/working_copies/diff_tests-27/A/D/G/pi
A svn-test-work/working_copies/diff_tests-27/A/D/G/rho
A svn-test-work/working_copies/diff_tests-27/A/D/G/tau
A svn-test-work/working_copies/diff_tests-27/A/D/H
A svn-test-work/working_copies/diff_tests-27/A/D/H/chi
A svn-test-work/working_copies/diff_tests-27/A/D/H/omega
A svn-test-work/working_copies/diff_tests-27/A/D/H/psi
A svn-test-work/working_copies/diff_tests-27/iota
Checked out revision 1.
CMD: svn add foo --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.459427>
A foo
CMD: svn ci -m "log msg r2" --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.598772>
Adding foo
Transmitting file data .
Committed revision 2.
CMD: svn ci -m "log msg r3" --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.497885>
Sending foo
Transmitting file data .
Committed revision 3.
CMD: svn up --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.467105>
At revision 3.
CMD: svn rm foo --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.407663>
D foo
CMD: svn diff -r 1 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.432545>
CMD: svn diff -r 1:BASE --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.367387>
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1,2 @@
+xxx
+yyy
EXPECTED STDOUT:
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 3)
@@ -0,0 +1,2 @@
+xxx
+yyy
ACTUAL STDOUT:
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1,2 @@
+xxx
+yyy
EXCEPTION: SVNLineUnequal
Traceback (most recent call last):
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1172, in run
rc = self.pred.run(sandbox)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 146, in run
return self.func(sandbox)
File "./diff_tests.py", line 2031, in diff_schedule_delete
'diff', '-r', '1:BASE')
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 207, in run_and_verify_svn
expected_exit, *varargs)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 241, in run_and_verify_svn2
verify.verify_outputs(message, out, err, expected_stdout, expected_stderr)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 363, in verify_outputs
compare_and_display_lines(message, label, expected, actual, raisable)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 336, in compare_and_display_lines
raise raisable
SVNLineUnequal
FAIL: diff_tests.py 27: scheduled deleted
CMD: svnadmin create svn-test-work/repositories/diff_tests-32 --bdb-txn-nosync
<TIME = 0.190809>
CMD: svnadmin dump svn-test-work/local_tmp/repos | svnadmin load svn-test-work/repositories/diff_tests-32 --ignore-uuid
<TIME = 0.264138>
CMD: svn co file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/repositories/diff_tests-32 svn-test-work/working_copies/diff_tests-32 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.698848>
A svn-test-work/working_copies/diff_tests-32/A
A svn-test-work/working_copies/diff_tests-32/A/B
A svn-test-work/working_copies/diff_tests-32/A/B/lambda
A svn-test-work/working_copies/diff_tests-32/A/B/E
A svn-test-work/working_copies/diff_tests-32/A/B/E/alpha
A svn-test-work/working_copies/diff_tests-32/A/B/E/beta
A svn-test-work/working_copies/diff_tests-32/A/B/F
A svn-test-work/working_copies/diff_tests-32/A/mu
A svn-test-work/working_copies/diff_tests-32/A/C
A svn-test-work/working_copies/diff_tests-32/A/D
A svn-test-work/working_copies/diff_tests-32/A/D/gamma
A svn-test-work/working_copies/diff_tests-32/A/D/G
A svn-test-work/working_copies/diff_tests-32/A/D/G/pi
A svn-test-work/working_copies/diff_tests-32/A/D/G/rho
A svn-test-work/working_copies/diff_tests-32/A/D/G/tau
A svn-test-work/working_copies/diff_tests-32/A/D/H
A svn-test-work/working_copies/diff_tests-32/A/D/H/chi
A svn-test-work/working_copies/diff_tests-32/A/D/H/omega
A svn-test-work/working_copies/diff_tests-32/A/D/H/psi
A svn-test-work/working_copies/diff_tests-32/iota
Checked out revision 1.
CMD: svn add X foo --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.363076>
A X
A X/bar
A foo
CMD: svn ci -m log_msg --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.513199>
Adding X
Adding X/bar
Adding foo
Transmitting file data ..
Committed revision 2.
CMD: svn propset propname propvalue X foo X/bar --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.364929>
property 'propname' set on 'X'
property 'propname' set on 'foo'
property 'propname' set on 'X/bar'
CMD: svn ci -m log_msg --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.506115>
Sending X
Sending X/bar
Sending foo
Committed revision 3.
CMD: svn diff -r 1 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.456476>
Property changes on: X
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 1)
@@ -0,0 +1 @@
+content
Property changes on: X/bar
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1 @@
+content
Property changes on: foo
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
EXPECTED STDOUT:
Property changes on: X
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 3)
@@ -0,0 +1 @@
+content
Property changes on: X/bar
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 3)
@@ -0,0 +1 @@
+content
Property changes on: foo
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
ACTUAL STDOUT:
Property changes on: X
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 1)
@@ -0,0 +1 @@
+content
Property changes on: X/bar
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1 @@
+content
Property changes on: foo
___________________________________________________________________
Added: propname
## -0,0 +1 ##
+propvalue
EXCEPTION: SVNLineUnequal
Traceback (most recent call last):
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1172, in run
rc = self.pred.run(sandbox)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 146, in run
return self.func(sandbox)
File "./diff_tests.py", line 2250, in diff_repos_wc_add_with_props
'diff', '-r', '1')
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 207, in run_and_verify_svn
expected_exit, *varargs)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 241, in run_and_verify_svn2
verify.verify_outputs(message, out, err, expected_stdout, expected_stderr)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 363, in verify_outputs
compare_and_display_lines(message, label, expected, actual, raisable)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 336, in compare_and_display_lines
raise raisable
SVNLineUnequal
FAIL: diff_tests.py 32: repos-wc diff showing added entries with props
CMD: svnadmin create svn-test-work/repositories/diff_tests-34 --bdb-txn-nosync
<TIME = 0.200476>
CMD: svnadmin dump svn-test-work/local_tmp/repos | svnadmin load svn-test-work/repositories/diff_tests-34 --ignore-uuid
<TIME = 0.240093>
CMD: svn co file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/repositories/diff_tests-34 svn-test-work/working_copies/diff_tests-34 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.631497>
A svn-test-work/working_copies/diff_tests-34/A
A svn-test-work/working_copies/diff_tests-34/A/B
A svn-test-work/working_copies/diff_tests-34/A/B/lambda
A svn-test-work/working_copies/diff_tests-34/A/B/E
A svn-test-work/working_copies/diff_tests-34/A/B/E/alpha
A svn-test-work/working_copies/diff_tests-34/A/B/E/beta
A svn-test-work/working_copies/diff_tests-34/A/B/F
A svn-test-work/working_copies/diff_tests-34/A/mu
A svn-test-work/working_copies/diff_tests-34/A/C
A svn-test-work/working_copies/diff_tests-34/A/D
A svn-test-work/working_copies/diff_tests-34/A/D/gamma
A svn-test-work/working_copies/diff_tests-34/A/D/G
A svn-test-work/working_copies/diff_tests-34/A/D/G/pi
A svn-test-work/working_copies/diff_tests-34/A/D/G/rho
A svn-test-work/working_copies/diff_tests-34/A/D/G/tau
A svn-test-work/working_copies/diff_tests-34/A/D/H
A svn-test-work/working_copies/diff_tests-34/A/D/H/chi
A svn-test-work/working_copies/diff_tests-34/A/D/H/omega
A svn-test-work/working_copies/diff_tests-34/A/D/H/psi
A svn-test-work/working_copies/diff_tests-34/iota
Checked out revision 1.
CMD: svn add X --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.331853>
A X
A X/bar
CMD: svn ci -m log_msg --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.448988>
Adding X
Adding X/bar
Transmitting file data .
Committed revision 2.
CMD: svn diff -r 1:BASE --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.356167>
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 1)
@@ -0,0 +1 @@
+content
EXPECTED STDOUT:
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 2)
@@ -0,0 +1 @@
+content
ACTUAL STDOUT:
Index: X/bar
===================================================================
--- X/bar (revision 0)
+++ X/bar (revision 1)
@@ -0,0 +1 @@
+content
EXCEPTION: SVNLineUnequal
Traceback (most recent call last):
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1172, in run
rc = self.pred.run(sandbox)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 146, in run
return self.func(sandbox)
File "./diff_tests.py", line 2330, in diff_repos_working_added_dir
'diff', '-r', '1:BASE')
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 207, in run_and_verify_svn
expected_exit, *varargs)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 241, in run_and_verify_svn2
verify.verify_outputs(message, out, err, expected_stdout, expected_stderr)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 363, in verify_outputs
compare_and_display_lines(message, label, expected, actual, raisable)
File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 336, in compare_and_display_lines
raise raisable
SVNLineUnequal
FAIL: diff_tests.py 34: repos->WORKING diff showing added modifed dir
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408694
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Oct 21, 2009 at 06:45:51AM -0500, Hyrum K. Wright wrote:
> Huh? That latest run of the ubuntu buildbot shows both of these
> failures:
> http://crest.ics.uci.edu/buildbot/builders/x64-ubuntu%20gcc/builds/1930/steps/Test%20fsfs%2Bra_local/logs/stdio
Hopefully fixed in r40150.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409822
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Oct 21, 2009, at 6:37 AM, Stefan Sperling wrote:
> On Wed, Oct 21, 2009 at 10:31:52AM +0100, Julian Foad wrote:
>> FYI the build-bots (except Windows) are currently failing
>> diff_tests.py
>> 27 and 32 with what appears to be an uninitialized revision-number:
>>
>> CMD: svn diff -r 1:BASE
>> Index: foo
>> ===================================================================
>> --- foo (revision 0)
>> +++ foo (revision 8589934593)
>> @@ -0,0 +1,2 @@
>> +xxx
>> +yyy
>> EXPECTED STDOUT:
>> Index: foo
>> ===================================================================
>> --- foo (revision 0)
>> +++ foo (revision 1)
>> @@ -0,0 +1,2 @@
>> +xxx
>> +yyy
>
> Doesn't seem to happen reliably? Right now these tests aren't
> failing on the bots.
Huh? That latest run of the ubuntu buildbot shows both of these
failures:
http://crest.ics.uci.edu/buildbot/builders/x64-ubuntu%20gcc/builds/1930/steps/Test%20fsfs%2Bra_local/logs/stdio
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409739
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Oct 21, 2009 at 10:31:52AM +0100, Julian Foad wrote:
> FYI the build-bots (except Windows) are currently failing diff_tests.py
> 27 and 32 with what appears to be an uninitialized revision-number:
>
> CMD: svn diff -r 1:BASE
> Index: foo
> ===================================================================
> --- foo (revision 0)
> +++ foo (revision 8589934593)
> @@ -0,0 +1,2 @@
> +xxx
> +yyy
> EXPECTED STDOUT:
> Index: foo
> ===================================================================
> --- foo (revision 0)
> +++ foo (revision 1)
> @@ -0,0 +1,2 @@
> +xxx
> +yyy
Doesn't seem to happen reliably? Right now these tests aren't
failing on the bots.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409737
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Julian Foad <ju...@btopenworld.com>.
FYI the build-bots (except Windows) are currently failing diff_tests.py
27 and 32 with what appears to be an uninitialized revision-number:
CMD: svn diff -r 1:BASE
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 8589934593)
@@ -0,0 +1,2 @@
+xxx
+yyy
EXPECTED STDOUT:
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1,2 @@
+xxx
+yyy
- Julian
Julian Foad wrote:
> On Mon, 2009-10-19, Stefan Sperling wrote:
> > On Sun, Oct 18, 2009 at 11:49:52PM +0200, Stefan Sperling wrote:
> > > And how we can have fun controlling diff output from the command line:
> >
> > This behaviour is encoded in libsvn_wc/diff.c:close_file().
> >
> > > $ svn diff -r1:BASE
> > > Index: foo
> > > ===================================================================
> > > --- foo (revision 0)
> >
> > We have hard-coded r0 for added files in libsvn_wc/diff.c:{file_diff,
> > report_wc_file_as_added,close_file}.
> > Since foo did not exist in r1, it is considered added.
> [...]
>
> > The "working copy" labels are caused by wc-ng correctly reporting
> > SVN_INVALID_REVNUM for the deleted node foo (it's deleted locally
> > in the WC).
> >
> > > $ svn diff -rBASE:1
> > > Index: foo
> > > ===================================================================
> > > --- foo (working copy)
> > > +++ foo (revision 1)
> > > @@ -1,2 +0,0 @@
> > > -xxx
> > > -yyy
> > > $ svn diff -rBASE:2
> > > Index: foo
> > > ===================================================================
> > > --- foo (working copy)
> > > +++ foo (revision 2)
> > > @@ -1,2 +1 @@
> > > xxx
> > > -yyy
> > >
> >
> > > No idea so far why my change caused this, though.
> > > In any case, it might not even be a bug, and even if it is,
> > > it's likely not a bug in WC-NG.
> >
> > So turns out it's alright, at least in this test.
> > I'll check the other tests similarly, and if I don't see any problems,
> > I'll adjust the expected test output.
>
> How about we start writing a spec for the command-line output formats
> that we want, such as the attached (with a bit of semantics and
> syntactical detail still to be filled in).
>
> - Julian
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409468
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409701
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Julian Foad <ju...@btopenworld.com>.
On Mon, 2009-10-19, Stefan Sperling wrote:
> On Sun, Oct 18, 2009 at 11:49:52PM +0200, Stefan Sperling wrote:
> > And how we can have fun controlling diff output from the command line:
>
> This behaviour is encoded in libsvn_wc/diff.c:close_file().
>
> > $ svn diff -r1:BASE
> > Index: foo
> > ===================================================================
> > --- foo (revision 0)
>
> We have hard-coded r0 for added files in libsvn_wc/diff.c:{file_diff,
> report_wc_file_as_added,close_file}.
> Since foo did not exist in r1, it is considered added.
[...]
> The "working copy" labels are caused by wc-ng correctly reporting
> SVN_INVALID_REVNUM for the deleted node foo (it's deleted locally
> in the WC).
>
> > $ svn diff -rBASE:1
> > Index: foo
> > ===================================================================
> > --- foo (working copy)
> > +++ foo (revision 1)
> > @@ -1,2 +0,0 @@
> > -xxx
> > -yyy
> > $ svn diff -rBASE:2
> > Index: foo
> > ===================================================================
> > --- foo (working copy)
> > +++ foo (revision 2)
> > @@ -1,2 +1 @@
> > xxx
> > -yyy
> >
>
> > No idea so far why my change caused this, though.
> > In any case, it might not even be a bug, and even if it is,
> > it's likely not a bug in WC-NG.
>
> So turns out it's alright, at least in this test.
> I'll check the other tests similarly, and if I don't see any problems,
> I'll adjust the expected test output.
How about we start writing a spec for the command-line output formats
that we want, such as the attached (with a bit of semantics and
syntactical detail still to be filled in).
- Julian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409468
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Oct 18, 2009 at 11:49:52PM +0200, Stefan Sperling wrote:
> And how we can have fun controlling diff output from the command line:
This behaviour is encoded in libsvn_wc/diff.c:close_file().
> $ svn diff -r1:BASE
> Index: foo
> ===================================================================
> --- foo (revision 0)
We have hard-coded r0 for added files in libsvn_wc/diff.c:{file_diff,
report_wc_file_as_added,close_file}.
Since foo did not exist in r1, it is considered added.
> +++ foo (revision 1)
> @@ -0,0 +1,2 @@
> +xxx
> +yyy
> $ svn diff -r2:BASE
> Index: foo
> ===================================================================
> --- foo (revision 2)
> +++ foo (working copy)
> @@ -1 +1,2 @@
> xxx
> +yyy
foo exists in r2, so in this case we see a diff.
> The above two don't align well,
In fact, when taking a closer look it all makes sense.
> the following are more consistent:
The "working copy" labels are caused by wc-ng correctly reporting
SVN_INVALID_REVNUM for the deleted node foo (it's deleted locally
in the WC).
> $ svn diff -rBASE:1
> Index: foo
> ===================================================================
> --- foo (working copy)
> +++ foo (revision 1)
> @@ -1,2 +0,0 @@
> -xxx
> -yyy
> $ svn diff -rBASE:2
> Index: foo
> ===================================================================
> --- foo (working copy)
> +++ foo (revision 2)
> @@ -1,2 +1 @@
> xxx
> -yyy
>
> No idea so far why my change caused this, though.
> In any case, it might not even be a bug, and even if it is,
> it's likely not a bug in WC-NG.
So turns out it's alright, at least in this test.
I'll check the other tests similarly, and if I don't see any problems,
I'll adjust the expected test output.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408894
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Oct 18, 2009 at 11:32:51PM +0200, Stefan Sperling wrote:
> On Sun, Oct 18, 2009 at 05:06:25PM -0400, Greg Stein wrote:
> > Euh... why not fix it before committing?
>
> Cause I didn't have much hope of fixing it as I'm barely scratching
> WC-NG on the surface. But OK, I'll try fixing it. So it should be r2
> or r3, let's see...
Turns out the rev in the diff header does not depend on the rev recorded
in the WC. Note how foo has rev 3 in BASE:
$ sqlite3 .svn/wc.db .dump | grep foo
INSERT INTO "BASE_NODE" VALUES(1,'foo',1,'foo','','normal','file',3,'$md5 $c1e83ac2a8724d11fb85025f7bd5d807',8,3,1255892725685633,'jrandom','infinity',NULL,1255892725151491,NULL,NULL,NULL,NULL);
INSERT INTO "WORKING_NODE" VALUES(1,'foo','','base-deleted','file','$md5 $c1e83ac2a8724d11fb85025f7bd5d807',8,3,1255892725685633,'jrandom','infinity',NULL,NULL,NULL,NULL,NULL,NULL,1255892725151491,X'2829',0);
And how we can have fun controlling diff output from the command line:
$ svn diff -r1:BASE
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1,2 @@
+xxx
+yyy
$ svn diff -r2:BASE
Index: foo
===================================================================
--- foo (revision 2)
+++ foo (working copy)
@@ -1 +1,2 @@
xxx
+yyy
The above two don't align well, the following are more consistent:
$ svn diff -rBASE:1
Index: foo
===================================================================
--- foo (working copy)
+++ foo (revision 1)
@@ -1,2 +0,0 @@
-xxx
-yyy
$ svn diff -rBASE:2
Index: foo
===================================================================
--- foo (working copy)
+++ foo (revision 2)
@@ -1,2 +1 @@
xxx
-yyy
To recap, this is what the first failing test was doing:
CMD: svn diff -r 1:BASE --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.367387>
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 1)
@@ -0,0 +1,2 @@
+xxx
+yyy
EXPECTED STDOUT:
Index: foo
===================================================================
--- foo (revision 0)
+++ foo (revision 3)
@@ -0,0 +1,2 @@
+xxx
+yyy
No idea so far why my change caused this, though.
In any case, it might not even be a bug, and even if it is,
it's likely not a bug in WC-NG.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408737
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Oct 18, 2009 at 05:06:25PM -0400, Greg Stein wrote:
> On Sun, Oct 18, 2009 at 17:00, Stefan Sperling <st...@elego.de> wrote:
> > On Sun, Oct 18, 2009 at 04:51:03PM -0400, Greg Stein wrote:
> >> On Sun, Oct 18, 2009 at 16:50, Stefan Sperling <st...@elego.de> wrote:
> >> > On Sun, Oct 18, 2009 at 04:24:55PM -0400, Greg Stein wrote:
> >> >> It looks like the expected output of those tests is proper (if you
> >> >> ignore the "revision 0" to imply a missing left node). I don't
> >> >> understand why your change is reporting "revision 1" for those nodes.
> >> >> They're clearly supposed to be r2 or r3.
> >> >
> >> > So... there might be a bug?
> >>
> >> Seems like, yeah.
> >
> > Should I mark the tests XFail with a comment pointing to this thread,
> > and commit the change?
>
> Euh... why not fix it before committing?
Cause I didn't have much hope of fixing it as I'm barely scratching
WC-NG on the surface. But OK, I'll try fixing it. So it should be r2
or r3, let's see...
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408734
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Greg Stein <gs...@gmail.com>.
On Sun, Oct 18, 2009 at 17:00, Stefan Sperling <st...@elego.de> wrote:
> On Sun, Oct 18, 2009 at 04:51:03PM -0400, Greg Stein wrote:
>> On Sun, Oct 18, 2009 at 16:50, Stefan Sperling <st...@elego.de> wrote:
>> > On Sun, Oct 18, 2009 at 04:24:55PM -0400, Greg Stein wrote:
>> >> It looks like the expected output of those tests is proper (if you
>> >> ignore the "revision 0" to imply a missing left node). I don't
>> >> understand why your change is reporting "revision 1" for those nodes.
>> >> They're clearly supposed to be r2 or r3.
>> >
>> > So... there might be a bug?
>>
>> Seems like, yeah.
>
> Should I mark the tests XFail with a comment pointing to this thread,
> and commit the change?
Euh... why not fix it before committing?
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408729
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Oct 18, 2009 at 04:51:03PM -0400, Greg Stein wrote:
> On Sun, Oct 18, 2009 at 16:50, Stefan Sperling <st...@elego.de> wrote:
> > On Sun, Oct 18, 2009 at 04:24:55PM -0400, Greg Stein wrote:
> >> It looks like the expected output of those tests is proper (if you
> >> ignore the "revision 0" to imply a missing left node). I don't
> >> understand why your change is reporting "revision 1" for those nodes.
> >> They're clearly supposed to be r2 or r3.
> >
> > So... there might be a bug?
>
> Seems like, yeah.
Should I mark the tests XFail with a comment pointing to this thread,
and commit the change?
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408727
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Greg Stein <gs...@gmail.com>.
On Sun, Oct 18, 2009 at 16:50, Stefan Sperling <st...@elego.de> wrote:
> On Sun, Oct 18, 2009 at 04:24:55PM -0400, Greg Stein wrote:
>> It looks like the expected output of those tests is proper (if you
>> ignore the "revision 0" to imply a missing left node). I don't
>> understand why your change is reporting "revision 1" for those nodes.
>> They're clearly supposed to be r2 or r3.
>
> So... there might be a bug?
Seems like, yeah.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408725
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Oct 18, 2009 at 04:24:55PM -0400, Greg Stein wrote:
> It looks like the expected output of those tests is proper (if you
> ignore the "revision 0" to imply a missing left node). I don't
> understand why your change is reporting "revision 1" for those nodes.
> They're clearly supposed to be r2 or r3.
So... there might be a bug?
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408724
Re: more wc-ng node revision differences that affect 'svn diff'
Posted by Greg Stein <gs...@gmail.com>.
On Sun, Oct 18, 2009 at 15:12, Stefan Sperling <st...@elego.de> wrote:
> Hey,
>
> The patch below results in test failures, as shown below.
>
> Like other failures I've seen, the tests fail because revisions
> reported by wc-ng for added or deleted nodes don't match up with
> what wc-1 reported.
Right. wc-1 overloaded the entry->revision field to mean different
things, in different states. Very messy.
wc-ng cleans all this up. You only have a revision value for something
direct from the repository. And then if you add/delete that node, then
the revision is SVN_INVALID_REVNUM because an uncommitted change does
not have a revision in the repository. You can still look "under" that
change and get the revision number of the node from the repos, if that
is necessary, but the changed node doesn't really have one.
entry->revision has different semantics, so its value will not match
what wc-ng will tell you.
> Can someone explain the rationale behind these differences?
> Should I simply adjust the expected output or do these tests failures
> exhibit undesired behaviour?
It looks like the expected output of those tests is proper (if you
ignore the "revision 0" to imply a missing left node). I don't
understand why your change is reporting "revision 1" for those nodes.
They're clearly supposed to be r2 or r3.
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2408716