##// END OF EJS Templates
templatekw: compare target context and its parent exactly (issue4690)...
templatekw: compare target context and its parent exactly (issue4690) Before this patch, template keywords `{file_mods}`, `{file_adds}` and `{file_dels}` use values gotten by `repo.status(ctx.p1().node(), ctx.node())`. But this doesn't work as expected if `ctx` is `memctx` or `workingcommitctx`. Typical case of templating with these contexts is customization of the text shown in the commit message editor by `[committemplate]` configuration. In this case, `ctx.node()` returns None and it causes comparison between `ctx.p1()` and `workingctx`. `workingctx` lists up all changed files in the working directory even at selective committing. BTW, `{files}` uses `ctx.files()` and it works as expected. To compare target context and its parent exactly, this patch passes `ctx.p1()` and `ctx` without `node()`-nize. This avoids unexpected comparison with `workingctx`. This patch uses a little redundant template configurations in `test-commit.t`, but they are needed to avoid regression around problems fixed by a4958cdb2202 and 1e6fb8db666e: accessing on `ctx` may break `ctx._status` field.

File last commit:

r16217:df5ecb81 default
r25392:ed18f4ac 3.4.1 stable
Show More
README
20 lines | 547 B | text/plain | TextLexer
Martin Geisler
README: add small introduction
r12857 Mercurial
=========
Mercurial is a fast, easy to use, distributed revision control tool
for software developers.
Matt Mackall
Move README info to wiki
r3935 Basic install:
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
Matt Mackall
Move README info to wiki
r3935 $ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help
mpm@selenic.com
README: integrate some changes from Kevin Smith...
r205
Ross Lagerwall
readme: mention how to run in-place...
r16217 Running without installing:
$ make local # build for inplace usage
$ ./hg --version # should show the latest version
Dirkjan Ochtman
change wiki/bts URLs to point to new hostname
r8936 See http://mercurial.selenic.com/ for detailed installation
Matt Mackall
Move README info to wiki
r3935 instructions, platform-specific notes, and Mercurial user information.