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

Re: diff don't recognize all changes in keyword expansions

From: Uwe Zeisberger <zeisberg_at_informatik.uni-freiburg.de>
Date: 2003-12-22 11:43:11 CET

kfogel@collab.net wrote:
> Totally a bug, yeah. Whew. Uwe, can you file an issue about just the
> 'revert' part of the recipe?
done, it's issue 1663

I wrote a test for it:

Log:
[[[
Test for issue 1663: keywords don't get reverted

* subversion/tests/clients/cmdline/trans_tests.py:
  (revert_keywords): New test.

]]]

Index: subversion/tests/clients/cmdline/trans_tests.py
===================================================================
--- subversion/tests/clients/cmdline/trans_tests.py (revision 8067)
+++ subversion/tests/clients/cmdline/trans_tests.py (working copy)
@@ -533,7 +533,44 @@
                                               "$Rev: 2 $" ], None,
                                       'cat', '-r', 'HEAD', mu_path)
   
+def revert_keywords(sbox):
+ "check that keywords are resubstituted on revert"
 
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ iota_path = os.path.join(wc_dir, 'iota')
+
+ fp = open(iota_path, 'w')
+ fp.write("This is the file 'iota'.\n$Rev$")
+ fp.close()
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', 'svn:keywords', 'Rev',
+ iota_path)
+
+ expected_output = wc.State(wc_dir, {
+ 'iota' : Item(verb='Sending'),
+ })
+
+ svntest.actions.run_and_verify_commit(wc_dir, expected_output, None,
+ None, None, None, None, None, wc_dir)
+
+ fp = open(iota_path, 'w')
+ fp.write("This is the file 'iota'.\n$Rev$")
+ fp.close()
+
+ svntest.actions.run_and_verify_svn(None, None, None, 'revert', iota_path)
+
+ fp = open(iota_path, 'r')
+ lines = fp.readlines()
+ if not ((len(lines) == 2)
+ and (re.match("This is the file 'iota'\.", lines[0]))
+ and (re.match("\$Rev: 2\$", lines[1]))):
+ print "keyword was not reverted"
+ raise svntest.Failure
+ fp.close()
+
+
 ########################################################################
 # Run the tests
 
@@ -548,6 +585,7 @@
               eol_change_is_text_mod,
               keyword_expanded_on_checkout,
               cat_keyword_expansion,
+ revert_keywords,
              ]
 
 if __name__ == '__main__':

-- 
Uwe Zeisberger
http://www.google.com/search?q=parsec%5E2*Joule%2FNewton+in+tablespoon

  • application/pgp-signature attachment: stored
Received on Mon Dec 22 11:43:44 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.