Rev 3383: Switch the status code to use get_parent_map instead of get_parents() in http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/find_differences

John Arbash Meinel john at arbash-meinel.com
Tue Apr 22 21:36:54 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/find_differences

------------------------------------------------------------
revno: 3383
revision-id: john at arbash-meinel.com-20080422203057-a907ny2ytrw008c7
parent: john at arbash-meinel.com-20080422203026-s8kpv2f9pm1cjocb
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: find_differences
timestamp: Tue 2008-04-22 15:30:57 -0500
message:
  Switch the status code to use get_parent_map instead of get_parents()
modified:
  bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
-------------- next part --------------
=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py	2008-04-22 20:04:49 +0000
+++ b/bzrlib/status.py	2008-04-22 20:30:57 +0000
@@ -170,11 +170,12 @@
         # present nodes.
         merge_extra.discard(_mod_revision.NULL_REVISION)
         merged_graph = {}
-        for merge, parents in zip(merge_extra, graph.get_parents(merge_extra)):
-            if parents is None: # The revision does not exist in the repository
+        parent_map = graph.get_parent_map(merge_extra)
+        for merge in merge_extra:
+            if merge not in parent_map: # The revision does not exist in the repository
                 merged_graph[merge] = []
             else:
-                merged_graph[merge] = [p for p in parents if p in merge_extra]
+                merged_graph[merge] = [p for p in parent_map[merge] if p in merge_extra]
         sorter = tsort.MergeSorter(merged_graph, merge)
         # Get a handle to all of the revisions we will need
         width = osutils.terminal_width()



More information about the bazaar-commits mailing list