Mercurial > hg
annotate tests/test-context.py @ 23862:7aa1405528a3
branchcache: add debug output whenever cache files use truncate
The cache files are usually append only but will automatically be truncated and
recover in exceptional situations. Add a debug notice when such exceptional
situations are encountered.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 14 Jan 2015 01:15:26 +0100 |
parents | bfce25d25c96 |
children | d8e0c591781c |
rev | line source |
---|---|
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
1 import os |
14379
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
2 from mercurial import hg, ui, context, encoding |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
3 |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
4 u = ui.ui() |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
5 |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
6 repo = hg.repository(u, 'test1', create=1) |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
7 os.chdir('test1') |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
8 |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
9 # create 'foo' with fixed time stamp |
23060
4eaea93b3e5b
tests: open file in binary mode to use POSIX end-of-line style anywhere
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21837
diff
changeset
|
10 f = open('foo', 'wb') |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
11 f.write('foo\n') |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
12 f.close() |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
13 os.utime('foo', (1000, 1000)) |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
14 |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
15 # add+commit 'foo' |
11303
a1aad8333864
move working dir/dirstate methods from localrepo to workingctx
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9031
diff
changeset
|
16 repo[None].add(['foo']) |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
17 repo.commit(text='commit1', date="0 0") |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
18 |
6747
f6c00b17387c
use repo[changeid] to get a changectx
Matt Mackall <mpm@selenic.com>
parents:
6740
diff
changeset
|
19 print "workingfilectx.date =", repo[None]['foo'].date() |
14379
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
20 |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
21 # test memctx with non-ASCII commit message |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
22 |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
23 def filectxfn(repo, memctx, path): |
21689
503bb3af70fe
memfilectx: call super.__init__ instead of duplicating code
Sean Farley <sean.michael.farley@gmail.com>
parents:
14379
diff
changeset
|
24 return context.memfilectx(repo, "foo", "") |
14379
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
25 |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
26 ctx = context.memctx(repo, ['tip', None], |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
27 encoding.tolocal("Gr\xc3\xbcezi!"), |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
28 ["foo"], filectxfn) |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
29 ctx.commit() |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
30 for enc in "ASCII", "Latin-1", "UTF-8": |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
31 encoding.encoding = enc |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
32 print "%-8s: %s" % (enc, repo["tip"].description()) |
21836
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
33 |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
34 # test performing a status |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
35 |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
36 def getfilectx(repo, memctx, f): |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
37 fctx = memctx.parents()[0][f] |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
38 data, flags = fctx.data(), fctx.flags() |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
39 if f == 'foo': |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
40 data += 'bar\n' |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
41 return context.memfilectx(repo, f, data, 'l' in flags, 'x' in flags) |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
42 |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
43 ctxa = repo.changectx(0) |
21837
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
44 ctxb = context.memctx(repo, [ctxa.node(), None], "test diff", ["foo"], |
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
45 getfilectx, ctxa.user(), ctxa.date()) |
21836
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
46 |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
47 print ctxb.status(ctxa) |
21837
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
48 |
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
49 # test performing a diff on a memctx |
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
50 |
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
51 for d in ctxb.diff(ctxa, git=True): |
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
52 print d |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
53 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
54 # test safeness and correctness of "cxt.status()" |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
55 print '= checking context.status():' |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
56 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
57 # ancestor "wcctx ~ 2" |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
58 actx2 = repo['.'] |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
59 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
60 repo.wwrite('bar-m', 'bar-m\n', '') |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
61 repo.wwrite('bar-r', 'bar-r\n', '') |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
62 repo[None].add(['bar-m', 'bar-r']) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
63 repo.commit(text='add bar-m, bar-r', date="0 0") |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
64 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
65 # ancestor "wcctx ~ 1" |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
66 actx1 = repo['.'] |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
67 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
68 repo.wwrite('bar-m', 'bar-m bar-m\n', '') |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
69 repo.wwrite('bar-a', 'bar-a\n', '') |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
70 repo[None].add(['bar-a']) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
71 repo[None].forget(['bar-r']) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
72 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
73 # status at this point: |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
74 # M bar-m |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
75 # A bar-a |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
76 # R bar-r |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
77 # C foo |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
78 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
79 from mercurial import scmutil |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
80 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
81 print '== checking workingctx.status:' |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
82 |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
83 wctx = repo[None] |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
84 print 'wctx._status=%s' % (str(wctx._status)) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
85 |
23709
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
86 print '=== with "pattern match":' |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
87 print actx1.status(other=wctx, |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
88 match=scmutil.matchfiles(repo, ['bar-m', 'foo'])) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
89 print 'wctx._status=%s' % (str(wctx._status)) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
90 print actx2.status(other=wctx, |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
91 match=scmutil.matchfiles(repo, ['bar-m', 'foo'])) |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
92 print 'wctx._status=%s' % (str(wctx._status)) |
23709
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
93 |
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
94 print '=== with "always match" and "listclean=True":' |
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
95 print actx1.status(other=wctx, listclean=True) |
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
96 print 'wctx._status=%s' % (str(wctx._status)) |
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
97 print actx2.status(other=wctx, listclean=True) |
33e5431684c0
context: make unknown/ignored/clean of cached status empty for equivalence
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23700
diff
changeset
|
98 print 'wctx._status=%s' % (str(wctx._status)) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
99 |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
100 print "== checking workingcommitctx.status:" |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
101 |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
102 wcctx = context.workingcommitctx(repo, |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
103 scmutil.status(['bar-m'], |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
104 ['bar-a'], |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
105 [], |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
106 [], [], [], []), |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
107 text='', date='0 0') |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
108 print 'wcctx._status=%s' % (str(wcctx._status)) |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
109 |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
110 print '=== with "always match":' |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
111 print actx1.status(other=wcctx) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
112 print 'wcctx._status=%s' % (str(wcctx._status)) |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
113 print actx2.status(other=wcctx) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
114 print 'wcctx._status=%s' % (str(wcctx._status)) |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
115 |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
116 print '=== with "always match" and "listclean=True":' |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
117 print actx1.status(other=wcctx, listclean=True) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
118 print 'wcctx._status=%s' % (str(wcctx._status)) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
119 print actx2.status(other=wcctx, listclean=True) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
120 print 'wcctx._status=%s' % (str(wcctx._status)) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
121 |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
122 print '=== with "pattern match":' |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
123 print actx1.status(other=wcctx, |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
124 match=scmutil.matchfiles(repo, ['bar-m', 'foo'])) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
125 print 'wcctx._status=%s' % (str(wcctx._status)) |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
126 print actx2.status(other=wcctx, |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
127 match=scmutil.matchfiles(repo, ['bar-m', 'foo'])) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
128 print 'wcctx._status=%s' % (str(wcctx._status)) |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
129 |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
130 print '=== with "pattern match" and "listclean=True":' |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
131 print actx1.status(other=wcctx, |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
132 match=scmutil.matchfiles(repo, ['bar-r', 'foo']), |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
133 listclean=True) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
134 print 'wcctx._status=%s' % (str(wcctx._status)) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
135 print actx2.status(other=wcctx, |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
136 match=scmutil.matchfiles(repo, ['bar-r', 'foo']), |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
137 listclean=True) |
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
138 print 'wcctx._status=%s' % (str(wcctx._status)) |