Changeset d4112ba in mainline
- Timestamp:
- 2012-08-02T14:36:08Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 798105ca
- Parents:
- 9bcdbc5
- Location:
- contrib/bazaar
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/bazaar/bzreml/__init__.py
r9bcdbc5 rd4112ba 102 102 return "" 103 103 104 def 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 104 111 def revision_sequence(branch, revision_old_id, revision_new_id): 105 112 """Calculate a sequence of revisions""" 106 113 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): 108 115 if (revision_ac_id == revision_old_id): 109 116 break -
contrib/bazaar/mbprotect/__init__.py
r9bcdbc5 rd4112ba 45 45 from bzrlib.errors import TipChangeRejected 46 46 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 47 54 def pre_change_branch_tip(params): 48 55 repo = params.branch.repository … … 54 61 # First permitted case is appending changesets to main branch.Look for 55 62 # old tip in new main branch. 56 for revision_id in repo.iter_reverse_revision_history(params.new_revid):63 for revision_id in iter_reverse_revision_history(repo, params.new_revid): 57 64 if revision_id == params.old_revid: 58 65 return # Found old tip … … 60 67 # Another permitted case is backing out changesets. Look for new tip 61 68 # in old branch. 62 for revision_id in repo.iter_reverse_revision_history(params.old_revid):69 for revision_id in iter_reverse_revision_history(repo, params.old_revid): 63 70 if revision_id == params.new_revid: 64 71 return # Found new tip
Note:
See TracChangeset
for help on using the changeset viewer.