using commands.log

Matt Mackall mpm at selenic.com
Wed Jul 29 11:29:17 CDT 2009


On Tue, 2009-07-28 at 11:46 -0700, scrappy doo wrote:
> Is there something similar to commands.log where instead of just
> displaying the changesets of a file I can get the changeset objects
> and work with them (e.g., get their IDs)? 

You want a context.

from mercurial import hg, ui

u = ui.ui()
r = hg.repository(u, '.')

c = r['tip']
print str(c)

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list