hg log/id question
Neal Becker
ndbecker2 at gmail.com
Thu Dec 6 19:30:19 UTC 2007
On Thursday 06 December 2007, Dustin Sallings wrote:
> On Dec 6, 2007, at 4:03, Neal Becker wrote:
> > hg log --template "{rev}:{node|short} {date|isodate} {author|email}
> > \n" -l1
> >
> > to print the version of my program (from the program).
> >
> > I noticed that hg id adds '+' to indicate uncommited changes.
> > Sounds like
> > it would be nice to add that into my printout. Any suggestion how
> > to do it
> > (other than brute force - call hg log, then call hg id, look for
> > '+'...)
>
> You really need both if you want to do something like this. id tells
> you the tree version (and whether the tree properly matches that
> version or not), and log gives you the above information about that
> version as it was committed.
>
> That is, as soon as you start using named branches or some kind of
> alternate release mechanism (tag and release from tag), the above
> recipe will not work because the latest log entry won't be your
> released version.
Thanks.
I wonder, though, if I should really be using a mercurial API, since my
program is written in python anyway? Is there a documented hg API?
More information about the Mercurial
mailing list