projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6376cff
)
hg-to-git: abort if the project directory is not a hg repo
author
Miklos Vajna
<vmiklos@frugalware.org>
Sun, 6 Jul 2008 03:15:18 +0000
(
05:15
+0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 6 Jul 2008 06:35:11 +0000
(23:35 -0700)
Check the exit code of the first hg command, and abort to avoid a later
ValueError exception.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/hg-to-git/hg-to-git.py
patch
|
blob
|
history
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
@@
if state:
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