subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1430504 - /subversion/trunk/subversion/tests/cmdline/merge_tests.py
Date Tue, 08 Jan 2013 20:43:11 GMT
Author: julianfoad
Date: Tue Jan  8 20:43:11 2013
New Revision: 1430504

URL: http://svn.apache.org/viewvc?rev=1430504&view=rev
Log:
Add a regression test for issue #4155 'Merge conflict text of expanded keyword
incorrect when svn:keyword property value removed'. This test passes on
trunk and fails on 1.7.8.

* subversion/tests/cmdline/merge_tests.py
  (merge_conflict_when_keywords_removed): New test.
  (test_list): Run it.

Modified:
    subversion/trunk/subversion/tests/cmdline/merge_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1430504&r1=1430503&r2=1430504&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Tue Jan  8 20:43:11 2013
@@ -17905,6 +17905,56 @@ def merge_binary_file_with_keywords(sbox
                           target='foo'),
     [], 'merge', '^/bar', 'foo')
 
+#----------------------------------------------------------------------
+# Test for issue #4155 'Merge conflict text of expanded keyword incorrect
+# when svn:keyword property value removed'. Failed in 1.7.0 through 1.7.8.
+@SkipUnless(server_has_mergeinfo)
+@Issue(4155)
+def merge_conflict_when_keywords_removed(sbox):
+  "merge conflict when keywords removed"
+
+  sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+
+  # make a file with keyword expansion enabled
+  svntest.main.file_write('A/keyfile', "$Date$ $Revision$\n")
+  sbox.simple_add('A/keyfile')
+  sbox.simple_propset('svn:keywords', 'Date Revision', 'A/keyfile')
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # branch the file
+  sbox.simple_repo_copy('A', 'A2')
+  sbox.simple_update()
+
+  #
+  svntest.main.file_append('A/keyfile', " some changes\n")
+  sbox.simple_commit()
+
+  # sync merge
+  svntest.actions.run_and_verify_svn(
+    None,
+    expected_merge_output([[3,4]],
+                          ['U    A2/keyfile\n',
+                           ' U   A2\n']),
+    [], 'merge', '^/A', 'A2')
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # modify the original version: disable those KW & enable 'Id'
+  sbox.simple_propset('svn:keywords', 'Id', 'A/keyfile')
+  svntest.main.file_append('A/keyfile', "$Id$\n")
+  sbox.simple_commit()
+
+  # sync merge again
+  svntest.actions.run_and_verify_svn(
+    None,
+    expected_merge_output([[5,6]],
+                          ['UU   A2/keyfile\n',
+                           ' U   A2\n']),
+    [], 'merge', '--accept=postpone', '^/A', 'A2')
+
 ########################################################################
 # Run the tests
 
@@ -18042,6 +18092,7 @@ test_list = [ None,
               merge_with_added_subtrees_with_mergeinfo,
               merge_with_externals_with_mergeinfo,
               merge_binary_file_with_keywords,
+              merge_conflict_when_keywords_removed,
              ]
 
 if __name__ == '__main__':



Mime
View raw message