tools/updaterevision.py

changeset 971
c00f9665a9f8
parent 970
c8aae45afd85
child 1431
2e0e2c696605
equal deleted inserted replaced
970:c8aae45afd85 971:c00f9665a9f8
34 import outputfile 34 import outputfile
35 35
36 def main(): 36 def main():
37 import subprocess 37 import subprocess
38 from datetime import datetime 38 from datetime import datetime
39 parser = argparser.ArgumentParser (description='Writes a header file with Hg commit information') 39 parser = argparse.ArgumentParser (description='Writes a header file with Hg commit information')
40 parser.add_argument ('output') 40 parser.add_argument ('output')
41 args = parser.parse_args() 41 args = parser.parse_args()
42 f = OutputFile (args.output) 42 f = outputfile.OutputFile (args.output)
43 data = subprocess.check_output (['hg', 'log', '-r.', '--template', 43 data = subprocess.check_output (['hg', 'log', '-r.', '--template',
44 '{node|short} {branch} {date|hgdate}']).replace ('\n', '').split (' ') 44 '{node|short} {branch} {date|hgdate}']).replace ('\n', '').split (' ')
45 45
46 rev = data[0] 46 rev = data[0]
47 branch = data[1] 47 branch = data[1]

mercurial