Rev 2364: change some variable names to make the function a bit clearer. in http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/log_ancestry

John Arbash Meinel john at arbash-meinel.com
Wed Apr 18 22:50:49 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/log_ancestry

------------------------------------------------------------
revno: 2364
revision-id: john at arbash-meinel.com-20070418215032-38i9ynsx6fkqaiyf
parent: john at arbash-meinel.com-20070418214759-xmfpvwok0v6ci38l
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: log_ancestry
timestamp: Wed 2007-04-18 16:50:32 -0500
message:
  change some variable names to make the function a bit clearer.
modified:
  bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
-------------- next part --------------
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2007-04-18 21:47:59 +0000
+++ b/bzrlib/log.py	2007-04-18 21:50:32 +0000
@@ -293,9 +293,9 @@
     This will also can be restricted based on a subset of the mainline.
     """
     # find all the revisions that change the specific file
-    sfw = branch.repository.weave_store.get_weave(file_id,
+    file_weave = branch.repository.weave_store.get_weave(file_id,
                 branch.repository.get_transaction())
-    sfw_revids = set(sfw.versions())
+    weave_modifed_revisions = set(file_weave.versions())
     # build the ancestry of each revision in the graph
     # - only listing the ancestors that change the specific file.
     rev_graph = branch.repository.get_revision_graph(mainline_revisions[-1])
@@ -303,13 +303,13 @@
     ancestry = {}
     for rev in sorted_rev_list:
         rev_ancestry = set()
-        if rev in sfw_revids:
+        if rev in weave_modifed_revisions:
             rev_ancestry.add(rev)
         for parent in rev_graph[rev]:
             rev_ancestry = rev_ancestry.union(ancestry[parent])
         ancestry[rev] = rev_ancestry
 
-    def is_merging_rev():
+    def is_merging_rev(r):
         parents = rev_graph[r]
         if len(parents) > 1:
             leftparent = parents[0]
@@ -322,7 +322,7 @@
     # filter from the view the revisions that did not change or merge 
     # the specific file
     return [(r, n, d) for r, n, d in view_revs_iter
-            if r in sfw_revids or is_merging_rev()]
+            if r in weave_modifed_revisions or is_merging_rev(r)]
 
 
 def get_view_revisions(mainline_revs, rev_nos, branch, direction,



More information about the bazaar-commits mailing list