API?

Neal Becker ndbecker2 at gmail.com
Wed Mar 11 17:56:54 UTC 2009


I asked some time back about how my program (which happens to be written in 
python) could get the rev information of my current code.  I was told the 
easiest thing was to use hg log, which I do this way:

revhash = Popen(["hg", "log", "--template", "{node|short}", "-r", "."], 
stdout=PIPE).communicate()[0]

This seems rather unfortunate.  Is there not a reasonable API I could use?  
If there is, is it documented?




More information about the Mercurial-devel mailing list