Index: contrib/bazaar/mbprotect/__init__.py
===================================================================
--- contrib/bazaar/mbprotect/__init__.py	(revision 850987dff0105b4172d3c7a9a864f646445c9516)
+++ contrib/bazaar/mbprotect/__init__.py	(revision ea5cc5b6a6f00fb33e6f02f2f3f401d2fb3984a2)
@@ -45,4 +45,11 @@
 from bzrlib.errors import TipChangeRejected
 
+def iter_reverse_revision_history(repository, revision_id):
+	"""Iterate backwards through revision ids in the lefthand history"""
+	
+	graph = repository.get_graph()
+	stop_revisions = (None, _mod_revision.NULL_REVISION)
+	return graph.iter_lefthand_ancestry(revision_id, stop_revisions)
+
 def pre_change_branch_tip(params):
 	repo = params.branch.repository
@@ -54,5 +61,5 @@
 	# First permitted case is appending changesets to main branch.Look for
 	# old tip in new main branch.
-	for revision_id in repo.iter_reverse_revision_history(params.new_revid):
+	for revision_id in iter_reverse_revision_history(repo, params.new_revid):
 		if revision_id == params.old_revid:
 			return	# Found old tip
@@ -60,5 +67,5 @@
 	# Another permitted case is backing out changesets. Look for new tip
 	# in old branch.
-	for revision_id in repo.iter_reverse_revision_history(params.old_revid):
+	for revision_id in iter_reverse_revision_history(repo, params.old_revid):
 		if revision_id == params.new_revid:
 			return	# Found new tip
