зеркало из https://github.com/microsoft/git.git
hg-to-git: abort if the project directory is not a hg repo
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>
This commit is contained in:
Родитель
6376cffaeb
Коммит
2553ede5a9
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче