convert: look up branch only among branches
repo[<branch name>] can find something that's not a branch, which is
not good.
Differential Revision: https://phab.mercurial-scm.org/D3161
--- a/hgext/convert/hg.py Thu Apr 05 16:10:52 2018 -0700
+++ b/hgext/convert/hg.py Fri Apr 06 10:46:24 2018 -0700
@@ -363,10 +363,8 @@
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():