/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: John Arbash Meinel
  • Date: 2007-04-18 21:50:32 UTC
  • mto: This revision was merged to the branch mainline in revision 2456.
  • Revision ID: john@arbash-meinel.com-20070418215032-38i9ynsx6fkqaiyf
change some variable names to make the function a bit clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
293
293
    This will also can be restricted based on a subset of the mainline.
294
294
    """
295
295
    # find all the revisions that change the specific file
296
 
    sfw = branch.repository.weave_store.get_weave(file_id,
 
296
    file_weave = branch.repository.weave_store.get_weave(file_id,
297
297
                branch.repository.get_transaction())
298
 
    sfw_revids = set(sfw.versions())
 
298
    weave_modifed_revisions = set(file_weave.versions())
299
299
    # build the ancestry of each revision in the graph
300
300
    # - only listing the ancestors that change the specific file.
301
301
    rev_graph = branch.repository.get_revision_graph(mainline_revisions[-1])
303
303
    ancestry = {}
304
304
    for rev in sorted_rev_list:
305
305
        rev_ancestry = set()
306
 
        if rev in sfw_revids:
 
306
        if rev in weave_modifed_revisions:
307
307
            rev_ancestry.add(rev)
308
308
        for parent in rev_graph[rev]:
309
309
            rev_ancestry = rev_ancestry.union(ancestry[parent])
310
310
        ancestry[rev] = rev_ancestry
311
311
 
312
 
    def is_merging_rev():
 
312
    def is_merging_rev(r):
313
313
        parents = rev_graph[r]
314
314
        if len(parents) > 1:
315
315
            leftparent = parents[0]
322
322
    # filter from the view the revisions that did not change or merge 
323
323
    # the specific file
324
324
    return [(r, n, d) for r, n, d in view_revs_iter
325
 
            if r in sfw_revids or is_merging_rev()]
 
325
            if r in weave_modifed_revisions or is_merging_rev(r)]
326
326
 
327
327
 
328
328
def get_view_revisions(mainline_revs, rev_nos, branch, direction,