[PATCH 2 of 2] git convert: some versions of git use fatal: instead of error:

Augie Fackler raf at durin42.com
Fri Feb 8 07:38:55 CST 2013


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1360328988 21600
# Node ID ea3f37a51ba131d66203548688224a1c889873e7
# Parent  d6b5ff41e899ffcd73ebbfaa9199cc2d235f918e
git convert: some versions of git use fatal: instead of error:

I saw this behavior with git 1.7.12 on my Mac.

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -232,7 +232,7 @@
         # Build complete list of tags, both annotated and bare ones
         for line in fh:
             line = line.strip()
-            if line.startswith("error:"):
+            if line.startswith("error:") or line.startswith("fatal:"):
                 raise util.Abort(_('cannot read tags from %s') % self.path)
             node, tag = line.split(None, 1)
             if not tag.startswith(prefix):


More information about the Mercurial-devel mailing list