[PATCH] convert/git: abort if git submodules are detected (issue2150)

2 views
Skip to first unread message

Augie Fackler

unread,
Mar 24, 2012, 11:13:32 PM3/24/12
to mercuri...@selenic.com
# HG changeset patch
# User Augie Fackler <dur...@gmail.com>
# Date 1332645197 18000
# Node ID 05a0d5879139a722cf38b6b048a86ce5cc87d2f7
# Parent 12e3f93b1cbc7c930e941f0adfe632c8ad70b73d
convert/git: abort if git submodules are detected (issue2150)

This improves the error message when convert encounters a git
submodule. Now, instead of a git-cat-file error, we'll directly report
the lack of support for git submodules.

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -97,6 +97,8 @@
seen.add(f)
entry = entry.split()
h = entry[3]
+ if entry[1] == '160000':
+ raise util.Abort('git submodules are not supported!')
p = (entry[1] == "100755")
s = (entry[1] == "120000")
self.modecache[(f, h)] = (p and "x") or (s and "l") or ""
_______________________________________________
Mercurial-devel mailing list
Mercuri...@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel

Reply all
Reply to author
Forward
0 new messages