summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2014-05-07 20:36:22 -0500
committerJunio C Hamano <gitster@pobox.com>2014-05-08 12:12:09 -0700
commitf237cabe57106e2d72c2b172b9d16406bb9ccb42 (patch)
treeca7046d9ee4a8921b1433236178c3ca018f33534
parent58aee0864adeeb5363f2a06728596f9c9315811f (diff)
downloadgit-fc/remote-hg-fixes-for-hg-3.0.tar.gz
[DONTMERGE-not signed-off] remote-hg: work with older versions of mercurialfc/remote-hg-fixes-for-hg-3.0
68d4f4f3 (remote-hg: custom method to write tags, 2013-04-22) tried to catch ManifestLookupError (which is a subclass of LookupError) in the new method write_tag() to detect and deal with an error. However, older versions of mercurial have this specific type of error and throws LookupError instead. By catching the more generic type of error, cover both old and new versions.
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 8b02803fd9..bc729d8d6d 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -872,7 +872,7 @@ def write_tag(repo, tag, node, msg, author):
try:
fctx = tip.filectx(f)
data = fctx.data()
- except error.ManifestLookupError:
+ except error.LookupError:
data = ""
content = data + "%s %s\n" % (node, tag)
return context.memfilectx(f, content, False, False, None)