If an update pulls in a null delta --- eg, because it updates across two
revisions that revert each other --- then it should behave as though it
pulled nothing at all: output no 'U filename' lines, and print "At
revision %ld".
Right?
[[[
Index: subversion/tests/cmdline/update_tests.py
===================================================================
--- subversion/tests/cmdline/update_tests.py (revision 1397561)
+++ subversion/tests/cmdline/update_tests.py (working copy)
@@ -5881,7 +5881,40 @@ def update_with_parents_and_exclude(sbox):
'--parents',
sbox.ospath('A/B'))
+@XFail()
+def null_delta(sbox):
+ "pulling a null delta not output"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ iota = sbox.ospath('iota')
+ iota_contents = open(iota).read()
+
+ # r2
+ open(iota, 'w').write('foo\n')
+ sbox.simple_commit()
+
+ # r3
+ open(iota, 'w').write(iota_contents)
+ sbox.simple_commit()
+
+ # A no-op update should have the same output as one pulling a null change.
+ sbox.simple_update(revision=3)
+ exit_code, output2, errput = svntest.main.run_svn(None, 'update', '-r3', iota)
+ if exit_code or errput:
+ raise svntest.Failure("update from r3 failed: %r" % [exit_code, errput])
+
+ sbox.simple_update(revision=1)
+ exit_code, output3, errput = svntest.main.run_svn(None, 'update', '-r3', iota)
+ if exit_code or errput:
+ raise svntest.Failure("update from r1 failed: %r" % [exit_code, errput])
+
+ if output2 != output3:
+ raise svntest.Failure("Test failed: two no-op updates have different "
+ "outputs:\n"
+ "%r\n%r\n" % (output2, output3))
+
#######################################################################
# Run the tests
@@ -5957,6 +5990,7 @@ test_list = [ None,
update_move_text_mod,
update_nested_move_text_mod,
update_with_parents_and_exclude,
+ null_delta,
]
if __name__ == '__main__':
]]]
Received on 2012-10-12 16:06:03 CEST