Rev 4661: That's take-theirs not take-their. in file:///home/vila/src/bzr/experimental/conflict-manager/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Jan 5 17:06:39 GMT 2010


At file:///home/vila/src/bzr/experimental/conflict-manager/

------------------------------------------------------------
revno: 4661
revision-id: v.ladeuil+lp at free.fr-20100105170638-5355y6f8go0luo52
parent: v.ladeuil+lp at free.fr-20100105155547-r80currf723upfbh
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: description
timestamp: Tue 2010-01-05 18:06:38 +0100
message:
  That's take-theirs not take-their.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2010-01-04 14:21:34 +0000
+++ b/NEWS	2010-01-05 17:06:38 +0000
@@ -29,7 +29,7 @@
   (Ted Gould, Matthew Fuller, Vincent Ladeuil)
 
 * Tree-shape conflicts can be resolved by providing ``--keep-mine`` and
-  ``--take-their`` to the ``bzr resolve`` command. Just marking the conflict
+  ``--take-theirs`` to the ``bzr resolve`` command. Just marking the conflict
   as resolved is still accessible via the ``--done`` default action.
   (Vincent Ladeuil, #257297, #232512)
 

=== modified file 'bzrlib/conflicts.py'
--- a/bzrlib/conflicts.py	2009-12-29 08:42:31 +0000
+++ b/bzrlib/conflicts.py	2010-01-05 17:06:38 +0000
@@ -83,7 +83,7 @@
     'keep-mine', 'keep_mine',
     'Resolve the conflict preserving the version in the working tree' )
 resolve_action_registry.register(
-    'take-their', 'take_their',
+    'take-theirs', 'take_theirs',
     'Resolve the conflict taking the merged version into account' )
 resolve_action_registry.default_key = 'done'
 
@@ -422,8 +422,8 @@
     def keep_mine(self, tree):
         raise NotImplementedError(self.keep_mine)
 
-    def take_their(self, tree):
-        raise NotImplementedError(self.take_their)
+    def take_theirs(self, tree):
+        raise NotImplementedError(self.take_theirs)
 
 
 class PathConflict(Conflict):
@@ -452,7 +452,7 @@
     def keep_mine(self, tree):
         tree.rename_one(self.conflict_path, self.path)
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         # just acccept bzr proposal
         pass
 
@@ -476,11 +476,11 @@
 
     # FIXME: I smell something weird here and it seems we should be able to be
     # more coherent with some other conflict ? bzr *did* a choice there but
-    # neither keep_mine nor take_their reflect that... -- vila 091224
+    # neither keep_mine nor take_theirs reflect that... -- vila 091224
     def keep_mine(self, tree):
         tree.remove([self.path + '.OTHER'], force=True, keep_files=False)
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         tree.remove([self.path], force=True, keep_files=False)
 
 
@@ -581,7 +581,7 @@
         tree.remove([self.conflict_path], force=True, keep_files=False)
         tree.rename_one(self.path, self.conflict_path)
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         tree.remove([self.path], force=True, keep_files=False)
 
 
@@ -604,7 +604,7 @@
         # just acccept bzr proposal
         pass
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         # FIXME: We shouldn't have to manipulate so many paths here (and there
         # is probably a bug or two...)
         conflict_base_path = osutils.basename(self.conflict_path)
@@ -631,7 +631,7 @@
     def keep_mine(self, tree):
         pass
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         pass
 
 
@@ -649,7 +649,7 @@
     def keep_mine(self, tree):
         tree.remove([self.path], force=True, keep_files=False)
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         # just acccept bzr proposal
         pass
 
@@ -672,7 +672,7 @@
         # just acccept bzr proposal
         pass
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         tree.remove([self.path], force=True, keep_files=False)
 
 
@@ -695,14 +695,14 @@
         else:
             raise NotImplementedError(self.keep_mine)
 
-    def take_their(self, tree):
+    def take_theirs(self, tree):
         # FIXME: we should preserve that path when the conflict is generated !
         if self.path.endswith('.new'):
             conflict_path = self.path[:-(len('.new'))]
             tree.remove([conflict_path], force=True, keep_files=False)
             tree.rename_one(self.path, conflict_path)
         else:
-            raise NotImplementedError(self.take_their)
+            raise NotImplementedError(self.take_theirs)
 
 
 ctype = {}

=== modified file 'bzrlib/tests/test_conflicts.py'
--- a/bzrlib/tests/test_conflicts.py	2010-01-04 14:59:00 +0000
+++ b/bzrlib/tests/test_conflicts.py	2010-01-05 17:06:38 +0000
@@ -224,7 +224,7 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_take_their(self):
+    def test_take_theirs(self):
         self.run_script("""
 $ bzr mv file.OTHER file
 $ bzr resolve file
@@ -237,9 +237,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their file
+$ bzr resolve --take-theirs file
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -292,9 +292,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their file2
+$ bzr resolve --take-theirs file2
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -335,7 +335,7 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_take_their(self):
+    def test_take_theirs(self):
         self.run_script("""
 $ bzr resolve dir
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
@@ -396,9 +396,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their dir
+$ bzr resolve --take-theirs dir
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -456,9 +456,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their dir
+$ bzr resolve --take-theirs dir
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -504,9 +504,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their file-in-branch
+$ bzr resolve --take-theirs file-in-branch
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -538,7 +538,7 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_take_their(self):
+    def test_take_theirs(self):
         self.run_script("""
 $ bzr mv dir2/dir1 dir1
 $ bzr mv dir2 dir1
@@ -552,9 +552,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their dir2
+$ bzr resolve --take-theirs dir2
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -595,7 +595,7 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_take_their(self):
+    def test_take_theirs(self):
         self.run_script("""
 $ bzr rm foo --force
 $ bzr mv foo.new foo
@@ -609,9 +609,9 @@
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
-    def test_resolve_taking_their(self):
+    def test_resolve_taking_theirs(self):
         self.run_script("""
-$ bzr resolve --take-their foo.new
+$ bzr resolve --take-theirs foo.new
 $ bzr commit --strict -m 'No more conflicts nor unknown files'
 """)
 
@@ -667,8 +667,8 @@
         opts, args = self.parse(['--keep-mine'])
         self.assertEqual({'action': 'keep_mine'}, opts)
 
-    def test_take_their(self):
-        opts, args = self.parse(['--action', 'take-their'])
-        self.assertEqual({'action': 'take_their'}, opts)
-        opts, args = self.parse(['--take-their'])
-        self.assertEqual({'action': 'take_their'}, opts)
+    def test_take_theirs(self):
+        opts, args = self.parse(['--action', 'take-theirs'])
+        self.assertEqual({'action': 'take_theirs'}, opts)
+        opts, args = self.parse(['--take-theirs'])
+        self.assertEqual({'action': 'take_theirs'}, opts)



More information about the bazaar-commits mailing list