Changeset d4112ba in mainline for contrib/bazaar/bzreml/__init__.py


Ignore:
Timestamp:
2012-08-02T14:36:08Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
798105ca
Parents:
9bcdbc5
Message:

Repository.iter_reverse_revision_history() method is deprecated and will be removed eventually
reimplement the wrapper around Graph.iter_lefthand_ancestry by our means

File:
1 edited

Legend:

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

    r9bcdbc5 rd4112ba  
    102102        return ""
    103103
     104def iter_reverse_revision_history(repository, revision_id):
     105        """Iterate backwards through revision ids in the lefthand history"""
     106       
     107        graph = repository.get_graph()
     108        stop_revisions = (None, _mod_revision.NULL_REVISION)
     109        return graph.iter_lefthand_ancestry(revision_id, stop_revisions)
     110
    104111def revision_sequence(branch, revision_old_id, revision_new_id):
    105112        """Calculate a sequence of revisions"""
    106113       
    107         for revision_ac_id in branch.repository.iter_reverse_revision_history(revision_new_id):
     114        for revision_ac_id in iter_reverse_revision_history(branch.repository, revision_new_id):
    108115                if (revision_ac_id == revision_old_id):
    109116                        break
Note: See TracChangeset for help on using the changeset viewer.