Rev 5129: (vila) Uncontroversial cleanups, mostly comments in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Apr 1 14:37:07 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5129 [merge]
revision-id: pqm at pqm.ubuntu.com-20100401133704-eo1imatu4ipjqaq4
parent: pqm at pqm.ubuntu.com-20100401090321-bzh43emrsqtfdne7
parent: v.ladeuil+lp at free.fr-20100401125619-z30ckvountjhb88i
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-04-01 14:37:04 +0100
message:
  (vila) Uncontroversial cleanups, mostly comments
modified:
  bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
  bzrlib/tests/per_branch/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
  bzrlib/tests/per_workingtree/__init__.py __init__.py-20060203003124-b2aa5aca21a8bfad
  bzrlib/tests/per_workingtree/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
  bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py	2010-03-25 09:07:14 +0000
+++ b/bzrlib/merge.py	2010-04-01 12:53:53 +0000
@@ -1015,7 +1015,6 @@
                         continue
                 else:
                     raise AssertionError('unhandled kind: %s' % other_ie.kind)
-                # XXX: We need to handle kind == 'symlink'
 
             # If we have gotten this far, that means something has changed
             result.append((file_id, content_changed,
@@ -1110,16 +1109,18 @@
 
     @staticmethod
     def _three_way(base, other, this):
-        #if base == other, either they all agree, or only THIS has changed.
         if base == other:
+            # if 'base == other', either they all agree, or only 'this' has
+            # changed.
             return 'this'
         elif this not in (base, other):
+            # 'this' is neither 'base' nor 'other', so both sides changed
             return 'conflict'
-        # "Ambiguous clean merge" -- both sides have made the same change.
         elif this == other:
+            # "Ambiguous clean merge" -- both sides have made the same change.
             return "this"
-        # this == base: only other has changed.
         else:
+            # this == base: only other has changed.
             return "other"
 
     @staticmethod
@@ -1169,7 +1170,7 @@
                 # only has an lca value
                 return 'other'
 
-        # At this point, the lcas disagree, and the tips disagree
+        # At this point, the lcas disagree, and the tip disagree
         return 'conflict'
 
     @staticmethod

=== modified file 'bzrlib/tests/per_branch/__init__.py'
--- a/bzrlib/tests/per_branch/__init__.py	2010-02-11 09:21:45 +0000
+++ b/bzrlib/tests/per_branch/__init__.py	2010-04-01 12:53:53 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Canonical Ltd
+# Copyright (C) 2006-2010 Canonical Ltd
 # Authors: Robert Collins <robert.collins at canonical.com>
 #          and others
 #
@@ -61,7 +61,7 @@
 
 
 class TestCaseWithBranch(TestCaseWithBzrDir):
-    """This helper will be parameterised in each branch_implementation test."""
+    """This helper will be parameterised in each per_branch test."""
 
     def setUp(self):
         super(TestCaseWithBranch, self).setUp()

=== modified file 'bzrlib/tests/per_workingtree/__init__.py'
--- a/bzrlib/tests/per_workingtree/__init__.py	2009-08-04 04:36:34 +0000
+++ b/bzrlib/tests/per_workingtree/__init__.py	2010-04-01 12:53:53 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Canonical Ltd
+# Copyright (C) 2006-2010 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 """WorkingTree implementation tests for bzr.
 
-These test the conformance of all the workingtre variations to the expected API.
+This test the conformance of all the workingtre variations to the expected API.
 Specific tests for individual formats are in the tests/test_workingtree file
 rather than in tests/per_workingtree/*.py.
 """

=== modified file 'bzrlib/tests/per_workingtree/test_commit.py'
--- a/bzrlib/tests/per_workingtree/test_commit.py	2010-01-25 17:48:22 +0000
+++ b/bzrlib/tests/per_workingtree/test_commit.py	2010-04-01 12:53:53 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006 Canonical Ltd
+# Copyright (C) 2006-2010 Canonical Ltd
 # Authors:  Robert Collins <robert.collins at canonical.com>
 #
 # This program is free software; you can redistribute it and/or modify
@@ -168,7 +168,7 @@
         tree_a.commit('change n in A')
 
         # Merging from A should introduce conflicts because 'n' was modified
-        # and removed, so 'a' needs to be restored.
+        # (in A) and removed (in B), so 'a' needs to be restored.
         num_conflicts = tree_b.merge_from_branch(tree_a.branch)
         self.assertEqual(3, num_conflicts)
         paths = [(path, ie.file_id)

=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py	2010-01-15 04:17:57 +0000
+++ b/bzrlib/transform.py	2010-04-01 12:53:53 +0000
@@ -2824,7 +2824,7 @@
                         # special-case the other tree root (move its
                         # children to current root)
                         if entry.parent_id is None:
-                            create=False
+                            create = False
                             moved = _reparent_transform_children(
                                 tt, trans_id, tt.root)
                             for child in moved:

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2010-03-02 22:25:58 +0000
+++ b/bzrlib/workingtree.py	2010-04-01 12:53:53 +0000
@@ -1139,7 +1139,7 @@
         This does not include files that have been deleted in this
         tree. Skips the control directory.
 
-        :param include_root: if True, do not return an entry for the root
+        :param include_root: if True, return an entry for the root
         :param from_dir: start from this directory or None for the root
         :param recursive: whether to recurse into subdirectories or not
         """




More information about the bazaar-commits mailing list