[Pkg-bazaar-commits] ./bzr-gtk/unstable r450: Update to use new Tree.iter_changes

Aaron Bentley aaron at aaronbentley.com
Fri Apr 10 07:44:51 UTC 2009


------------------------------------------------------------
revno: 450
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzr-gtk
timestamp: Tue 2008-03-11 09:18:28 -0400
message:
  Update to use new Tree.iter_changes
modified:
  commit.py
  diff.py
  tests/test_diff.py
-------------- next part --------------
=== modified file 'commit.py'
--- a/commit.py	2008-03-07 18:53:36 +0000
+++ b/commit.py	2008-03-11 13:18:28 +0000
@@ -173,7 +173,7 @@
 
         # The store holds:
         # [file_id, real path, checkbox, display path, changes type, message]
-        # _iter_changes returns:
+        # iter_changes returns:
         # (file_id, (path_in_source, path_in_target),
         #  changed_content, versioned, parent, name, kind,
         #  executable)
@@ -186,9 +186,9 @@
         self._wt.lock_read()
         self._basis_tree.lock_read()
         try:
-            from diff import _iter_changes_to_status
+            from diff import iter_changes_to_status
             for (file_id, real_path, change_type, display_path
-                ) in _iter_changes_to_status(self._basis_tree, self._wt):
+                ) in iter_changes_to_status(self._basis_tree, self._wt):
                 if self._selected and real_path != self._selected:
                     enabled = False
                 else:

=== modified file 'diff.py'
--- a/diff.py	2008-02-27 05:23:50 +0000
+++ b/diff.py	2008-03-11 13:18:28 +0000
@@ -227,7 +227,7 @@
 #        self.parent_tree.lock_read()
 #        self.rev_tree.lock_read()
 #        try:
-#            self.delta = _iter_changes_to_status(self.parent_tree, self.rev_tree)
+#            self.delta = iter_changes_to_status(self.parent_tree, self.rev_tree)
 #            self.path_to_status = {}
 #            self.path_to_diff = {}
 #            source_inv = self.parent_tree.inventory
@@ -568,10 +568,10 @@
             source.close()
 
 
-def _iter_changes_to_status(source, target):
+def iter_changes_to_status(source, target):
     """Determine the differences between trees.
 
-    This is a wrapper around _iter_changes which just yields more
+    This is a wrapper around iter_changes which just yields more
     understandable results.
 
     :param source: The source tree (basis tree)
@@ -593,7 +593,7 @@
         source.lock_read()
         try:
             for (file_id, paths, changed_content, versioned, parent_ids, names,
-                 kinds, executables) in target._iter_changes(source):
+                 kinds, executables) in target.iter_changes(source):
 
                 # Skip the root entry if it isn't very interesting
                 if parent_ids == (None, None):

=== modified file 'tests/test_diff.py'
--- a/tests/test_diff.py	2007-10-02 23:08:12 +0000
+++ b/tests/test_diff.py	2008-03-11 13:18:28 +0000
@@ -20,7 +20,7 @@
 
 from bzrlib import tests
 
-from bzrlib.plugins.gtk.diff import DiffView, _iter_changes_to_status
+from bzrlib.plugins.gtk.diff import DiffView, iter_changes_to_status
 
 
 class TestDiffViewSimple(tests.TestCase):
@@ -72,7 +72,7 @@
 class Test_IterChangesToStatus(tests.TestCaseWithTransport):
 
     def assertStatusEqual(self, expected, tree):
-        values = _iter_changes_to_status(tree.basis_tree(), tree)
+        values = iter_changes_to_status(tree.basis_tree(), tree)
         self.assertEqual(expected, values)
 
     def test_status_added(self):



More information about the Pkg-bazaar-commits mailing list