CVEEP
CVEEP

Reputation: 441

Possible to have Mercurial log incoming changesets?

I've been trying to hook into Mercurial in order to log groups of changesets that are pulled into the local working repository. In other words, I want to be able to view a history of changes that were pulled into the local repository. As it stands right now, I'm using the "prechangegroup" hook to, in turn, call hg incoming which then writes to a logfile which can later be parsed.

I'm curious if I'm reinventing the wheel here though. Are there any extensions out there that allow to me to query for this information directly through Mercurial instead of having to write to a separate log file? It would be nice to be able to use some kind of hg pullhistory --template... command to be able to get this information and format it instead of hoping that the user configures their system correctly so that the log directory is writable, etc.

Upvotes: 1

Views: 161

Answers (1)

Ry4an Brase
Ry4an Brase

Reputation: 78350

Mozilla uses something like this. They call it the "pushlog": http://hg.mozilla.org/mozilla-central/pushloghtml

They have a hook that pushes records into a database (IIRC) from a changegroup hook. The source for their's is available, so you're re-inventing the wheel, but it's such a small, specialized wheel, that's probably okay.

Upvotes: 2

Related Questions