Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
hg-to-git: abort if the project directory is not a hg repo
[gitweb.git]
/
contrib
/
hg-to-git
/
hg-to-git.py
diff --git
a/contrib/hg-to-git/hg-to-git.py
b/contrib/hg-to-git/hg-to-git.py
index 25d99411ca5d2ff8d7296cb9a70c6d0bdd0b934a..130b1c4bcda98354dd1b599bc2a4788985fa6beb 100755
(executable)
--- a/
contrib/hg-to-git/hg-to-git.py
+++ b/
contrib/hg-to-git/hg-to-git.py
@@
-106,7
+106,10
@@
def getgitenv(user, date):
else:
print 'State does not exist, first run'
-tip = os.popen('hg tip --template "{rev}"').read()
+sock = os.popen('hg tip --template "{rev}"')
+tip = sock.read()
+if sock.close():
+ sys.exit(1)
if verbose:
print 'tip is', tip