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

login
register
mail settings
Submitter Augie Fackler
Date Feb. 8, 2013, 1:38 p.m.
Message ID <ea3f37a51ba131d66203.1360330735@augie-macbookair>
Download mbox | patch
Permalink /patch/830/
State Accepted
Commit 5fe58f9332a462c7f279dafa8c16adc78b6b159b
Headers show

Comments

Augie Fackler - Feb. 8, 2013, 1:38 p.m.
# HG changeset patch
# User Augie Fackler <raf@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.

Patch

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):