mirror of https://github.com/apache/lucene.git
When there are unpushed commits, print out the full command used to show the commits
This commit is contained in:
parent
8412026265
commit
0d4aa0b8d1
|
@ -62,9 +62,10 @@ def getGitRev():
|
||||||
if 'nothing to commit, working directory clean' not in status:
|
if 'nothing to commit, working directory clean' not in status:
|
||||||
raise RuntimeError('git clone is dirty:\n\n%s' % status)
|
raise RuntimeError('git clone is dirty:\n\n%s' % status)
|
||||||
branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
|
branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
|
||||||
unpushedCommits = os.popen('git log origin/%s..' % branch).read().strip()
|
command = 'git log origin/%s..' % branch
|
||||||
|
unpushedCommits = os.popen(command).read().strip()
|
||||||
if len(unpushedCommits) > 0:
|
if len(unpushedCommits) > 0:
|
||||||
raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)
|
raise RuntimeError('There are unpushed commits - "%s" output is:\n\n%s' % (command, unpushedCommits))
|
||||||
|
|
||||||
print(' git clone is clean')
|
print(' git clone is clean')
|
||||||
return os.popen('git rev-parse HEAD').read().strip()
|
return os.popen('git rev-parse HEAD').read().strip()
|
||||||
|
|
Loading…
Reference in New Issue