subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1130036 - in /subversion/trunk/subversion/tests/cmdline: diff_tests.py diff_tests_data/ diff_tests_data/3449_spurious_v1 diff_tests_data/3449_spurious_v2 diff_tests_data/3449_spurious_v3
Date Wed, 01 Jun 2011 07:51:55 GMT
Author: philip
Date: Wed Jun  1 07:51:55 2011
New Revision: 1130036

URL: http://svn.apache.org/viewvc?rev=1130036&view=rev
Log:
Add a regression test for issue 3449, a spurious text conflict on update.

* subversion/tests/cmdline/diff_tests.py
  (no_spurious_conflict): New test.
  (test_list): Add new test.

* subversion/tests/cmdline/diff_tests_data: New.

* subversion/tests/cmdline/diff_tests_data/3449_spurious_v1: New.

* subversion/tests/cmdline/diff_tests_data/3449_spurious_v2: New.

* subversion/tests/cmdline/diff_tests_data/3449_spurious_v3: New.

Added:
    subversion/trunk/subversion/tests/cmdline/diff_tests_data/
    subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v1
    subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v2
    subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v3
Modified:
    subversion/trunk/subversion/tests/cmdline/diff_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1130036&r1=1130035&r2=1130036&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Wed Jun  1 07:51:55 2011
@@ -26,7 +26,7 @@
 ######################################################################
 
 # General modules
-import sys, re, os, time
+import sys, re, os, time, shutil
 
 # Our testing module
 import svntest
@@ -3773,6 +3773,45 @@ def diff_abs_localpath_from_wc_folder(sb
   os.chdir(os.path.abspath(A_path))
   svntest.actions.run_and_verify_svn(None, None, [], 'diff', B_abs_path)
   
+@Issue(3449)
+def no_spurious_conflict(sbox):
+  "no spurious conflict on update"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  data_dir = os.path.join(os.path.dirname(sys.argv[0]), 'diff_tests_data')
+  shutil.copyfile(os.path.join(data_dir, '3449_spurious_v1'),
+                  sbox.ospath('3449_spurious'))
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'add', sbox.ospath('3449_spurious'))
+  sbox.simple_commit()
+  shutil.copyfile(os.path.join(data_dir, '3449_spurious_v2'),
+                  sbox.ospath('3449_spurious'))
+  sbox.simple_commit()
+  shutil.copyfile(os.path.join(data_dir, '3449_spurious_v3'),
+                  sbox.ospath('3449_spurious'))
+  sbox.simple_commit()
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'update', '-r2', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'merge', '-c4', '^/', wc_dir)
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.tweak('', status=' M')
+  expected_status.add({
+      '3449_spurious' : Item(status='M ', wc_rev=2),
+      })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # This update produces a conflict in 1.6
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'update', '--accept', 'postpone', wc_dir)
+  expected_status.tweak(wc_rev=4)
+  expected_status.tweak('3449_spurious', status='  ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+        
+
 ########################################################################
 #Run the tests
 
@@ -3838,6 +3877,7 @@ test_list = [ None,
               diff_git_with_props,
               diff_git_with_props_on_dir,
               diff_abs_localpath_from_wc_folder,
+              no_spurious_conflict,
               ]
 
 if __name__ == '__main__':

Added: subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v1
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v1?rev=1130036&view=auto
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v1 (added)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v1 Wed Jun  1
07:51:55 2011
@@ -0,0 +1,31 @@
+0A
+0B
+0C
+
+FIND_PACKAGE(Subversion)
+IF(Subversion_FOUND)
+ 	IF(DEFINED KVIrc_WC_REVISION)
+		SET(CMAKE_KVIRC_BUILD_REVISION ${KVIrc_WC_REVISION})
+		MESSAGE("-- Current revision is ${KVIrc_WC_REVISION}")
+	ELSE()
+		MESSAGE("-- No Subversion working copy found")
+	ENDIF()
+ELSE()
+	STRING(COMPARE EQUAL "${MANUAL_REVISION}" "" MANUAL_REVISION_UNSET)
+	
+	IF(MANUAL_REVISION_UNSET)
+		MESSAGE("Subversion not found. No revision number will be used")
+	ELSE()
+		SET(CMAKE_KVIRC_BUILD_REVISION ${MANUAL_REVISION})
+		MESSAGE("-- Current revision has been manually set to ${MANUAL_REVISION}")
+	ENDIF()
+ENDIF()
+
+Blah
+
+0U
+0V
+0W
+0X
+0Y
+0Z

Added: subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v2
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v2?rev=1130036&view=auto
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v2 (added)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v2 Wed Jun  1
07:51:55 2011
@@ -0,0 +1,32 @@
+0A
+0B
+0C
+
+FIND_PACKAGE(Subversion)
+IF(Subversion_FOUND)
+ 	IF(DEFINED KVIrc_WC_REVISION)
+		SET(CMAKE_KVIRC_BUILD_REVISION ${KVIrc_WC_REVISION})
+		MESSAGE("-- Current revision is ${KVIrc_WC_REVISION}")
+	ELSE()
+		MESSAGE("-- No Subversion working copy found")
+	ENDIF()
+ELSE()
+	STRING(COMPARE EQUAL "${MANUAL_REVISION}" "" MANUAL_REVISION_UNSET)
+	
+	IF(MANUAL_REVISION_UNSET)
+		MESSAGE("Subversion not found. No revision number will be used")
+	ELSE()
+		SET(CMAKE_KVIRC_BUILD_REVISION ${MANUAL_REVISION})
+		MESSAGE("-- Current revision has been manually set to ${MANUAL_REVISION}")
+	ENDIF()
+ENDIF()
+
+Blah
+
+0U
+0V
+0W
+	New
+0X
+0Y
+0Z

Added: subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v3
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v3?rev=1130036&view=auto
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v3 (added)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests_data/3449_spurious_v3 Wed Jun  1
07:51:55 2011
@@ -0,0 +1,31 @@
+0A
+0B
+0C
+
+STRING(COMPARE EQUAL "${MANUAL_REVISION}" "" MANUAL_REVISION_UNSET)
+IF(MANUAL_REVISION_UNSET)
+	FIND_PACKAGE(Subversion)
+	IF(Subversion_FOUND)
+ 		IF(DEFINED KVIrc_WC_REVISION)
+			SET(CMAKE_KVIRC_BUILD_REVISION ${KVIrc_WC_REVISION})
+			MESSAGE("-- Current revision is ${KVIrc_WC_REVISION}")
+		ELSE()
+			MESSAGE("-- No Subversion working copy found")
+		ENDIF()
+	ELSE()
+		MESSAGE("Subversion not found. No revision number will be used")
+	ENDIF()
+ELSE()
+	New3A
+	New3B
+ENDIF()
+
+Blah
+
+0U
+0V
+0W
+	New
+0X
+0Y
+0Z



Mime
View raw message