[PATCH 1 of 2] make changeset_templater use context

Alexander Solovyov piranha at piranha.org.ua
Fri Mar 6 13:27:08 CST 2009


On 2009-02-05, Dirkjan Ochtman wrote:

Sorry for delay on that, I had troubles with time.

> Let me say first, that I certainly like the ideas for this, though
> ISTR bigger slowdowns.

ISTR?

> On Wed, Feb 4, 2009 at 22:57, Alexander Solovyov <piranha at piranha.org.ua> wrote:
>> +                files[:] = self.repo.status(ctx.parents()[0].node(),
>> +                                            ctx.node())[:3]

> Isn't ctx.files() equivalent?

No, ctx.files() will return single list of all files, while this code
will return tuple of three lists (modified, added, removed IIRC).

>> +            args.update(dict(rev=self.repo.manifest.rev(ctx.changeset()[0]),
>> +                             node=hex(ctx.changeset()[0])))

> ctx.manifest()?

ctx.manifest() will return manifest of changeset (list of files and
their revisions), while repo.manifest.rev() returns revision of
changeset manifest.

-- 
Alexander


More information about the Mercurial-devel mailing list