tests/test-demandimport.py.out
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 02 Jun 2015 02:28:33 +0900
branchstable
changeset 25392 ed18f4acf435
parent 21025 54af51c18c4c
child 27535 0d0f4070f6d7
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4631
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
os = <unloaded module 'os'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
os.system = <built-in function system>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
os = <module 'os' from '?'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
util = <unloaded module 'util'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
util.system = <function system at 0x?>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
util = <module 'mercurial.util' from '?'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
util.system = <function system at 0x?>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
fred = <unloaded module 're'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
re = <unloaded module 'sys'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
fred = <unloaded module 're'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
fred.sub = <function sub at 0x?>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
fred = <proxied module 're'>
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
re = <unloaded module 'sys'>
13083
c0290fc6b486 test-demandimport.py: PyPy support
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 9174
diff changeset
    14
re.stderr = <open file '<whatever>', mode 'w' at 0x?>
4631
e3afa670e484 demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
re = <proxied module 'sys'>
21025
54af51c18c4c demandimport: make it possible to disable by setting HGDEMANDIMPORT=disable
Mads Kiilerich <madski@unity3d.com>
parents: 13083
diff changeset
    16
node = <module 'mercurial.node' from '?'>