Improving logic for committing diffs

This commit is contained in:
Sergio Durigan Junior 2015-01-11 21:09:34 -05:00
parent 3833a81c0c
commit 8984dafd3e

View file

@ -46,12 +46,12 @@ class SaveGDBResults (ShellCommand):
else: else:
myhead = repo.heads[builder] myhead = repo.heads[builder]
myhead.checkout ()
if full_tag not in repo.tags: if full_tag not in repo.tags:
if repo.is_dirty (): myhead.checkout ()
repo.index.add (['%s/gdb.sum' % builder, repo.index.add (['%s/gdb.sum' % builder,
'%s/gdb.log' % builder, '%s/gdb.log' % builder,
'%s/%s/baseline' % (builder, branch)]) '%s/%s/baseline' % (builder, branch)])
if repo.is_dirty ():
repo.index.commit ('Log files for %s' % full_tag) repo.index.commit ('Log files for %s' % full_tag)
repo.index.write () repo.index.write ()
repo.create_tag (full_tag) repo.create_tag (full_tag)