195
195
# it should be valid for the package importer branches that we care
197
197
reverse_dict = dict((rev, tag) for tag, rev in tag_dict.items())
200
199
last_rev = the_branch.last_revision()
201
200
graph = the_branch.repository.get_graph()
202
201
stop_revisions = (None, revision.NULL_REVISION)
203
202
for rev_id in graph.iter_lefthand_ancestry(last_rev, stop_revisions):
204
203
if rev_id in reverse_dict:
205
204
return reverse_dict[rev_id]
210
207
def _get_newest_versions(the_branch, latest_pub):