subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1833168 - /subversion/trunk/subversion/tests/cmdline/shelf_tests.py
Date Fri, 08 Jun 2018 13:48:14 GMT
Author: julianfoad
Date: Fri Jun  8 13:48:14 2018
New Revision: 1833168

URL: http://svn.apache.org/viewvc?rev=1833168&view=rev
Log:
Shelving: Add a test for refusing to shelve a conflict.

A follow-up to r1833141.

* subversion/tests/cmdline/shelf_tests.py
  (refuse_to_shelve_conflict): New test.
  (test_list): Run it.

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

Modified: subversion/trunk/subversion/tests/cmdline/shelf_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/shelf_tests.py?rev=1833168&r1=1833167&r2=1833168&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/shelf_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/shelf_tests.py Fri Jun  8 13:48:14 2018
@@ -584,6 +584,45 @@ def list_shelves(sbox):
 
   os.chdir(was_cwd)
 
+#----------------------------------------------------------------------
+
+def refuse_to_shelve_conflict(sbox):
+  "refuse to shelve conflict"
+
+  sbox.build(empty=True)
+  was_cwd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+
+  # create a tree conflict victim at an unversioned path
+  sbox.simple_mkdir('topdir')
+  sbox.simple_commit()
+  sbox.simple_mkdir('topdir/subdir')
+  sbox.simple_commit()
+  sbox.simple_update()
+  sbox.simple_rm('topdir')
+  sbox.simple_commit()
+  sbox.simple_update()
+  svntest.actions.run_and_verify_svn(
+    None, [],
+    'merge', '-c2', '.', '--ignore-ancestry', '--accept', 'postpone')
+  svntest.actions.run_and_verify_svn(
+    None, 'svn: E155015:.*existing.*conflict.*',
+    'merge', '-c1', '.', '--ignore-ancestry', '--accept', 'postpone')
+
+  # attempt to shelve
+  expected_out = svntest.verify.RegexListOutput([
+    r'--- .*',
+    r'--- .*',
+    r'\?     C topdir',
+    r'      > .*',
+    r'      >   not shelved'])
+  svntest.actions.run_and_verify_svn(expected_out,
+                                     '.* 1 path could not be shelved',
+                                     'shelf-save', 'foo')
+
+  os.chdir(was_cwd)
+
 
 ########################################################################
 # Run the tests
@@ -613,6 +652,7 @@ test_list = [ None,
               shelve_file_copy,
               shelve_dir_copy,
               list_shelves,
+              refuse_to_shelve_conflict,
              ]
 
 if __name__ == '__main__':



Mime
View raw message