Mercurial > hg
changeset 37395:810413b745ff
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 06 Apr 2018 10:46:24 -0700 |
parents | 65705fbc9c37 |
children | 9966f44ecab4 |
files | hgext/convert/hg.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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():