hgext/convert/hg.py
branchstable
changeset 39021 7e023ce26c7f
parent 37579 ce566e0f73d0
child 39244 73cf21b2e8a6
--- a/hgext/convert/hg.py	Thu Aug 09 13:04:52 2018 +0800
+++ b/hgext/convert/hg.py	Tue Aug 14 14:00:35 2018 -0400
@@ -143,12 +143,17 @@
         for line in data.splitlines():
             s = line.split(' ', 1)
             if len(s) != 2:
+                self.ui.warn(_('invalid tag entry: "%s"\n') % line)
+                fp.write('%s\n' % line)  # Bogus, but keep for hash stability
                 continue
             revid = revmap.get(source.lookuprev(s[0]))
             if not revid:
                 if s[0] == nodemod.nullhex:
                     revid = s[0]
                 else:
+                    # missing, but keep for hash stability
+                    self.ui.warn(_('missing tag entry: "%s"\n') % line)
+                    fp.write('%s\n' % line)
                     continue
             fp.write('%s %s\n' % (revid, s[1]))
         return fp.getvalue()