Rev 3408: change the status code to use find_unique_ancestors() in http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/find_unique_ancestors

John Arbash Meinel john at arbash-meinel.com
Fri Apr 25 03:54:14 BST 2008


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

------------------------------------------------------------
revno: 3408
revision-id: john at arbash-meinel.com-20080425024812-3libjfzgsypi3l3l
parent: john at arbash-meinel.com-20080425021017-49mxjzvgk0enbhey
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: find_unique_ancestors
timestamp: Thu 2008-04-24 21:48:12 -0500
message:
  change the status code to use find_unique_ancestors()
modified:
  bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
-------------- next part --------------
=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py	2008-04-22 20:45:14 +0000
+++ b/bzrlib/status.py	2008-04-25 02:48:12 +0000
@@ -158,11 +158,12 @@
         to_file.write('pending merges:\n')
     ignore = set([None, last_revision, _mod_revision.NULL_REVISION])
     graph = branch.repository.get_graph()
+    other_revisions = [last_revision]
     for merge in pending:
         # Find all of the revisions in the merge source, which are not in the
         # last committed revision.
-        # We don't care about last_extra
-        last_extra, merge_extra = graph.find_difference(last_revision, merge)
+        merge_extra = graph.find_unique_ancestors(merge, other_revisions)
+        other_revisions.append(merge)
         # Now that we have the revisions, we need to sort them to get a proper
         # listing. We want to sort in reverse topological order (which
         # MergeSorter gives us). MergeSorter requires that there are no
@@ -176,7 +177,7 @@
                 merged_graph[next_merge] = []
             else:
                 merged_graph[next_merge] = [p for p in parent_map[next_merge]
-                                          if p in merge_extra]
+                                               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()
@@ -218,4 +219,3 @@
                 to_file.write(prefix)
                 to_file.write(line_log(mm_revision, width - len(prefix)))
                 to_file.write('\n')
-        ignore.update(merge_extra)



More information about the bazaar-commits mailing list