author | Maciej Fijalkowski <fijall@gmail.com> |
Thu, 08 Sep 2016 10:37:58 +0200 | |
changeset 29910 | a043c6d372db |
parent 29187 | aec5d8561be2 |
child 30559 | d83ca854fa21 |
permissions | -rw-r--r-- |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
1 |
from __future__ import absolute_import, print_function |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
2 |
import os |
28735
5edde05ff58e
py3: use absolute_import in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
27056
diff
changeset
|
3 |
from mercurial import ( |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
4 |
context, |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
5 |
encoding, |
28735
5edde05ff58e
py3: use absolute_import in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
27056
diff
changeset
|
6 |
hg, |
28775
67bff672ccc2
tests: alias ui as uimod in test-context
Yuya Nishihara <yuya@tcha.org>
parents:
28738
diff
changeset
|
7 |
ui as uimod, |
28735
5edde05ff58e
py3: use absolute_import in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
27056
diff
changeset
|
8 |
) |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
9 |
|
28775
67bff672ccc2
tests: alias ui as uimod in test-context
Yuya Nishihara <yuya@tcha.org>
parents:
28738
diff
changeset
|
10 |
u = uimod.ui() |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
11 |
|
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
12 |
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
|
13 |
os.chdir('test1') |
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 |
# 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
|
16 |
f = open('foo', 'wb') |
29187
aec5d8561be2
tests: mark test-context.py write as binary
timeless <timeless@mozdev.org>
parents:
28775
diff
changeset
|
17 |
f.write(b'foo\n') |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
18 |
f.close() |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
19 |
os.utime('foo', (1000, 1000)) |
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
20 |
|
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
21 |
# add+commit 'foo' |
11303
a1aad8333864
move working dir/dirstate methods from localrepo to workingctx
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9031
diff
changeset
|
22 |
repo[None].add(['foo']) |
4110
20af6a2f0b0e
Fixed workingfilectx.date() (found by Thomas Waldmann) with test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
23 |
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
|
24 |
|
27056
01489fa0bbbe
test-context: conditionalize the workingfilectx date printing for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
25 |
if os.name == 'nt': |
01489fa0bbbe
test-context: conditionalize the workingfilectx date printing for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
26 |
d = repo[None]['foo'].date() |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
27 |
print("workingfilectx.date = (%d, %d)" % (d[0], d[1])) |
27056
01489fa0bbbe
test-context: conditionalize the workingfilectx date printing for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
28 |
else: |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
29 |
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
|
30 |
|
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
31 |
# 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
|
32 |
|
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
33 |
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
|
34 |
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
|
35 |
|
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
36 |
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
|
37 |
encoding.tolocal("Gr\xc3\xbcezi!"), |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
38 |
["foo"], filectxfn) |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
39 |
ctx.commit() |
bd23d5f28bbb
changelog: convert user and desc from local encoding early
Martin Geisler <mg@aragost.com>
parents:
11303
diff
changeset
|
40 |
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
|
41 |
encoding.encoding = enc |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
42 |
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
|
43 |
|
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
44 |
# test performing a status |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
45 |
|
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
46 |
def getfilectx(repo, memctx, f): |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
47 |
fctx = memctx.parents()[0][f] |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
48 |
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
|
49 |
if f == 'foo': |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
50 |
data += 'bar\n' |
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
51 |
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
|
52 |
|
232038a05fdb
test-context: add test for memctx status
Sean Farley <sean.michael.farley@gmail.com>
parents:
21689
diff
changeset
|
53 |
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
|
54 |
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
|
55 |
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
|
56 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
57 |
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
|
58 |
|
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
59 |
# 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
|
60 |
|
61b333b982ea
test-context: add test for performing a diff on a memctx
Sean Farley <sean.michael.farley@gmail.com>
parents:
21836
diff
changeset
|
61 |
for d in ctxb.diff(ctxa, git=True): |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
62 |
print(d) |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
63 |
|
24180
d8e0c591781c
spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents:
23712
diff
changeset
|
64 |
# test safeness and correctness of "ctx.status()" |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
65 |
print('= checking context.status():') |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
66 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
67 |
# ancestor "wcctx ~ 2" |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
68 |
actx2 = repo['.'] |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
69 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
70 |
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
|
71 |
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
|
72 |
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
|
73 |
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
|
74 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
75 |
# ancestor "wcctx ~ 1" |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
76 |
actx1 = repo['.'] |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
77 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
78 |
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
|
79 |
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
|
80 |
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
|
81 |
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
|
82 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
83 |
# status at this point: |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
84 |
# M bar-m |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
85 |
# A bar-a |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
86 |
# R bar-r |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
87 |
# C foo |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
88 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
89 |
from mercurial import scmutil |
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
90 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
91 |
print('== checking workingctx.status:') |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
92 |
|
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
93 |
wctx = repo[None] |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
94 |
print('wctx._status=%s' % (str(wctx._status))) |
23700
a4958cdb2202
context: cache self._status correctly at workingctx.status
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23060
diff
changeset
|
95 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
96 |
print('=== with "pattern match":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
97 |
print(actx1.status(other=wctx, |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
98 |
match=scmutil.matchfiles(repo, ['bar-m', 'foo']))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
99 |
print('wctx._status=%s' % (str(wctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
100 |
print(actx2.status(other=wctx, |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
101 |
match=scmutil.matchfiles(repo, ['bar-m', 'foo']))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
102 |
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
|
103 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
104 |
print('=== with "always match" and "listclean=True":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
105 |
print(actx1.status(other=wctx, listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
106 |
print('wctx._status=%s' % (str(wctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
107 |
print(actx2.status(other=wctx, listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
108 |
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
|
109 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
110 |
print("== checking workingcommitctx.status:") |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
111 |
|
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
112 |
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
|
113 |
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
|
114 |
['bar-a'], |
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 |
[], [], [], []), |
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
117 |
text='', date='0 0') |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
118 |
print('wcctx._status=%s' % (str(wcctx._status))) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
119 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
120 |
print('=== with "always match":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
121 |
print(actx1.status(other=wcctx)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
122 |
print('wcctx._status=%s' % (str(wcctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
123 |
print(actx2.status(other=wcctx)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
124 |
print('wcctx._status=%s' % (str(wcctx._status))) |
23711
1e6fb8db666e
context: avoid breaking already fixed self._status at ctx.status()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23709
diff
changeset
|
125 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
126 |
print('=== with "always match" and "listclean=True":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
127 |
print(actx1.status(other=wcctx, listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
128 |
print('wcctx._status=%s' % (str(wcctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
129 |
print(actx2.status(other=wcctx, listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
130 |
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
|
131 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
132 |
print('=== with "pattern match":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
133 |
print(actx1.status(other=wcctx, |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
134 |
match=scmutil.matchfiles(repo, ['bar-m', 'foo']))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
135 |
print('wcctx._status=%s' % (str(wcctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
136 |
print(actx2.status(other=wcctx, |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
137 |
match=scmutil.matchfiles(repo, ['bar-m', 'foo']))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
138 |
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
|
139 |
|
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
140 |
print('=== with "pattern match" and "listclean=True":') |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
141 |
print(actx1.status(other=wcctx, |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
142 |
match=scmutil.matchfiles(repo, ['bar-r', 'foo']), |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
143 |
listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
144 |
print('wcctx._status=%s' % (str(wcctx._status))) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
145 |
print(actx2.status(other=wcctx, |
23712
bfce25d25c96
context: override _dirstatestatus in workingcommitctx for correct matching
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23711
diff
changeset
|
146 |
match=scmutil.matchfiles(repo, ['bar-r', 'foo']), |
28738
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
147 |
listclean=True)) |
706f4ab710c8
py3: lexicographical order imports and print_function in test-context.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28735
diff
changeset
|
148 |
print('wcctx._status=%s' % (str(wcctx._status))) |