Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/bazaar/mbprotect/__init__.py

    rd4112ba r9d58539  
    4545from bzrlib.errors import TipChangeRejected
    4646
    47 def iter_reverse_revision_history(repository, revision_id):
    48         """Iterate backwards through revision ids in the lefthand history"""
    49        
    50         graph = repository.get_graph()
    51         stop_revisions = (None, _mod_revision.NULL_REVISION)
    52         return graph.iter_lefthand_ancestry(revision_id, stop_revisions)
    53 
    5447def pre_change_branch_tip(params):
    5548        repo = params.branch.repository
     
    6154        # First permitted case is appending changesets to main branch.Look for
    6255        # old tip in new main branch.
    63         for revision_id in iter_reverse_revision_history(repo, params.new_revid):
     56        for revision_id in repo.iter_reverse_revision_history(params.new_revid):
    6457                if revision_id == params.old_revid:
    6558                        return  # Found old tip
     
    6760        # Another permitted case is backing out changesets. Look for new tip
    6861        # in old branch.
    69         for revision_id in iter_reverse_revision_history(repo, params.old_revid):
     62        for revision_id in repo.iter_reverse_revision_history(params.old_revid):
    7063                if revision_id == params.new_revid:
    7164                        return  # Found new tip
Note: See TracChangeset for help on using the changeset viewer.