Changeset da68871a in mainline for contrib/bazaar/mbprotect/__init__.py
- Timestamp:
- 2012-08-08T08:46:22Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30c0826
- Parents:
- bc216a0 (diff), 1d01cca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/bazaar/mbprotect/__init__.py
rbc216a0 rda68871a 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.