# HG changeset patch # User Martin von Zweigbergk # Date 2018-04-06 17:46:24 # Node ID 810413b745ff94685129a6ebd48a4db59cd62ec3 # Parent 65705fbc9c37ab5d8b439adcd353569312eb9b4d convert: look up branch only among branches repo[] can find something that's not a branch, which is not good. Differential Revision: https://phab.mercurial-scm.org/D3161 diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -363,10 +363,8 @@ class mercurial_sink(common.converter_si return p2 def puttags(self, tags): - try: - tagparent = self.repo[self.tagsbranch].node() - except error.RepoError: - tagparent = nodemod.nullid + tagparent = self.repo.branchtip(self.tagsbranch, ignoremissing=True) + tagparent = tagparent or nodemod.nullid oldlines = set() for branch, heads in self.repo.branchmap().iteritems():