--- a/updaterevision/updaterevision.py Wed Dec 10 19:17:00 2014 +0200 +++ b/updaterevision/updaterevision.py Wed Dec 10 19:22:51 2014 +0200 @@ -59,17 +59,15 @@ if subprocess.check_output (['hg', 'id', '-n']).replace ('\n', '')[-1] == '+': rev += '+' -if branch != 'default': - rev += '-%s' % branch - if rev == oldrev: print "%s is up to date at %s" % (sys.argv[1], rev) quit (0) with open (sys.argv[1], 'w') as fp: fp.write ('// %s\n' % rev) - fp.write ('#define REVISION_STRING "%s"\n' % rev) - fp.write ('#define REVISION_DATE "%s"\n' % datestring) - fp.write ('#define REVISION_DISPLAY_DATE "%s"\n' % date.strftime ('%d %b %Y')) - fp.write ('#define REVISION_TIME %d\n' % int (timestamp)) + fp.write ('#define HG_NODE "%s"\n' % rev) + fp.write ('#define HG_BRANCH "%s"\n' % branch) + fp.write ('#define HG_DATE_VERSION "%s"\n' % datestring) + fp.write ('#define HG_DATE_STRING "%s"\n' % date.strftime ('%d %b %Y')) + fp.write ('#define HG_DATE_TIME %d\n' % int (timestamp)) print '%s updated to %s' % (sys.argv[1], rev)