Mercurial > hg
annotate tests/test-encoding-align.t @ 25757:4d1382fd96ff
context: write dirstate out explicitly at the end of markcommitted
To detect change of a file without redundant comparison of file
content, dirstate recognizes a file as certainly clean, if:
(1) it is already known as "normal",
(2) dirstate entry for it has valid (= not "-1") timestamp, and
(3) mode, size and timestamp of it on the filesystem are as same as
ones expected in dirstate
This works as expected in many cases, but doesn't in the corner case
that changing a file keeps mode, size and timestamp of it on the
filesystem.
The timetable below shows steps in one of typical such situations:
---- ----------------------------------- ----------------
timestamp of "f"
----------------
dirstate file-
time action mem file system
---- ----------------------------------- ---- ----- -----
* *** ***
- 'hg transplant REV1 REV2 ...'
- transplanting REV1
....
N
- change "f", but keep size N
(via 'patch.patch()')
- 'dirstate.normal("f")' N ***
(via 'repo.commit()')
- transplanting REV2
- change "f", but keep size N
(via 'patch.patch()')
- aborted while patching
N+1
- release wlock
- 'dirstate.write()' N N N
- 'hg status' shows "r1" as "clean" N N N
---- ----------------------------------- ---- ----- -----
The most important point is that 'dirstate.write()' is executed at N+1
or later. This causes writing dirstate timestamp N of "f" out
successfully. If it is executed at N, 'parsers.pack_dirstate()'
replaces timestamp N with "-1" before actual writing dirstate out.
This issue can occur when 'hg transplant' satisfies conditions below:
- multiple revisions to be transplanted change the same file
- those revisions don't change mode and size of the file, and
- the 2nd or later revision of them fails after changing the file
The root cause of this issue is that files are changed without
flushing in-memory dirstate changes via 'repo.commit()' (even though
omitting 'dirstate.normallookup()' on files changed by 'patch.patch()'
for efficiency also causes this issue).
To detect changes of files correctly, this patch writes in-memory
dirstate changes out explicitly after marking files as clean in
'committablectx.markcommitted()', which is invoked via
'repo.commit()'.
After this change, timetable is changed as below:
---- ----------------------------------- ----------------
timestamp of "f"
----------------
dirstate file-
time action mem file system
---- ----------------------------------- ---- ----- -----
* *** ***
- 'hg transplant REV1 REV2 ...'
- transplanting REV1
....
N
- change "f", but keep size N
(via 'patch.patch()')
- 'dirstate.normal("f")' N ***
(via 'repo.commit()')
----------------------------------- ---- ----- -----
- 'dirsttate.write()' -1 -1
----------------------------------- ---- ----- -----
- transplanting REV2
- change "f", but keep size N
(via 'patch.patch()')
- aborted while patching
N+1
- release wlock
- 'dirstate.write()' -1 -1 N
- 'hg status' shows "r1" as "clean" -1 -1 N
---- ----------------------------------- ---- ----- -----
To reproduce this issue in tests certainly, this patch emulates some
timing critical actions as below:
- change "f" at N
'patch.patch()' with 'fakepatchtime.py' explicitly changes mtime
of patched files to "2000-01-01 00:00" (= N).
- 'dirstate.write()' via 'repo.commit()' at N
'fakedirstatewritetime.py' forces 'pack_dirstate()' to use
"2000-01-01 00:00" as "now", only if 'pack_dirstate()' is invoked
via 'committablectx.markcommitted()'.
- 'dirstate.write()' via releasing wlock at N+1 (or "not at N")
'pack_dirstate()' via releasing wlock uses actual timestamp at
runtime as "now", and it should be different from the "2000-01-01
00:00" of "f".
BTW, this patch doesn't test cases below, even though 'patch.patch()'
is used similarly in these cases:
1. failure of 'hg import' or 'hg qpush'
2. success of 'hg import', 'hg qpush' or 'hg transplant'
Case (1) above doesn't cause this kind of issue, because:
- if patching is aborted by conflicts, changed files are committed
changed files are marked as CLEAN, even though they are partially
patched.
- otherwise, dirstate are fully restored by 'dirstateguard'
For example in timetable above, timestamp of "f" in .hg/dirstate
is restored to -1 (or less than N), and subsequent 'hg status' can
detect changes correctly.
Case (2) always causes 'repo.status()' invocation via 'repo.commit()'
just after changing files inside same wlock scope.
---- ----------------------------------- ----------------
timestamp of "f"
----------------
dirstate file-
time action mem file system
---- ----------------------------------- ---- ----- -----
N *** ***
- make file "f" clean N
- execute 'hg foobar'
....
- 'dirstate.normal("f")' N ***
(e.g. via dirty check
or previous 'repo.commit()')
- change "f", but keep size N
- 'repo.status()' (*1)
(via 'repo.commit()')
---- ----------------------------------- ---- ----- -----
At a glance, 'repo.status()' at (*1) seems to cause similar issue (=
"changed files are treated as clean"), but actually doesn't.
'dirstate._lastnormaltime' should be N at (*1) above, because
'dirstate.normal()' via dirty check is finished at N.
Therefore, "f" changed at N (= 'dirstate._lastnormaltime') is forcibly
treated as "unsure" at (*1), and changes are detected as expected (see
'dirstate.status()' for detail).
If 'hg import' is executed with '--no-commit', 'repo.status()' isn't
invoked just after changing files inside same wlock scope.
But preceding 'dirstate.normal()' is invoked inside another wlock
scope via 'cmdutil.bailifchanged()', and in-memory changes should be
flushed at the end of that scope.
Therefore, timestamp N of clean "f" should be replaced by -1, if
'dirstate.write()' is invoked at N. It means that condition of this
issue isn't satisfied.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 08 Jul 2015 17:01:09 +0900 |
parents | 701df761aa94 |
children | 46ba2cdda476 |
rev | line source |
---|---|
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
1 Test alignment of multibyte characters |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
2 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
3 $ HGENCODING=utf-8 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
4 $ export HGENCODING |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
5 $ hg init t |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
6 $ cd t |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
7 $ python << EOF |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
8 > # (byte, width) = (6, 4) |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
9 > s = "\xe7\x9f\xad\xe5\x90\x8d" |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
10 > # (byte, width) = (7, 7): odd width is good for alignment test |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
11 > m = "MIDDLE_" |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
12 > # (byte, width) = (18, 12) |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
13 > l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d" |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
14 > f = file('s', 'w'); f.write(s); f.close() |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
15 > f = file('m', 'w'); f.write(m); f.close() |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
16 > f = file('l', 'w'); f.write(l); f.close() |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
17 > # instant extension to show list of options |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
18 > f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8 |
21254
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
19 > from mercurial import cmdutil |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
20 > cmdtable = {} |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
21 > command = cmdutil.command(cmdtable) |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
22 > |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
23 > @command('showoptlist', |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
24 > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'), |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
25 > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'), |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
26 > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')], |
51e5c793a9f4
tests: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17837
diff
changeset
|
27 > '') |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
28 > def showoptlist(ui, repo, *pats, **opts): |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
29 > '''dummy command to show option descriptions''' |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
30 > return 0 |
15031
0cb27eda3a1e
util: wrap lines with multi-byte characters correctly (issue2943)
Mads Kiilerich <mads@kiilerich.com>
parents:
12941
diff
changeset
|
31 > """ % globals()) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
32 > f.close() |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
33 > EOF |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
34 $ S=`cat s` |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
35 $ M=`cat m` |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
36 $ L=`cat l` |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
37 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
38 alignment of option descriptions in help |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
39 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
40 $ cat <<EOF > .hg/hgrc |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
41 > [extensions] |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
42 > ja_ext = `pwd`/showoptlist.py |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
43 > EOF |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
44 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
45 check alignment of option descriptions in help |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
46 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
47 $ hg help showoptlist |
15203
c7ce651a6bc9
help: generate command help into a single RST string for formatting
Matt Mackall <mpm@selenic.com>
parents:
15202
diff
changeset
|
48 hg showoptlist |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
49 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
50 dummy command to show option descriptions |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
51 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
52 options: |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
53 |
15145
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
54 -s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
55 -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
56 MIDDLE_ MIDDLE_ MIDDLE_ |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
57 -l --opt3 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d long width \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
58 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc) |
ff26712a0c50
help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents:
15066
diff
changeset
|
59 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
60 |
22110
26f7c8033bed
help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents:
21585
diff
changeset
|
61 (some details hidden, use --verbose to show complete help) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
62 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
63 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
64 $ rm -f s; touch s |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
65 $ rm -f m; touch m |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
66 $ rm -f l; touch l |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
67 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
68 add files |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
69 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
70 $ cp s $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
71 $ hg add $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
72 $ cp m $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
73 $ hg add $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
74 $ cp l $L |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
75 $ hg add $L |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
76 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
77 commit(1) |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
78 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
79 $ echo 'first line(1)' >> s; cp s $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
80 $ echo 'first line(2)' >> m; cp m $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
81 $ echo 'first line(3)' >> l; cp l $L |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
82 $ hg commit -m 'first commit' -u $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
83 |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
84 commit(2) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
85 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
86 $ echo 'second line(1)' >> s; cp s $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
87 $ echo 'second line(2)' >> m; cp m $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
88 $ echo 'second line(3)' >> l; cp l $L |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
89 $ hg commit -m 'second commit' -u $M |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
90 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
91 commit(3) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
92 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
93 $ echo 'third line(1)' >> s; cp s $S |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
94 $ echo 'third line(2)' >> m; cp m $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
95 $ echo 'third line(3)' >> l; cp l $L |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
96 $ hg commit -m 'third commit' -u $L |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
97 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
98 check alignment of user names in annotate |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
99 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
100 $ hg annotate -u $M |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
101 \xe7\x9f\xad\xe5\x90\x8d: first line(2) (esc) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
102 MIDDLE_: second line(2) |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
103 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d: third line(2) (esc) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
104 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
105 check alignment of filenames in diffstat |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
106 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
107 $ hg diff -c tip --stat |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
108 MIDDLE_ | 1 + |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
109 \xe7\x9f\xad\xe5\x90\x8d | 1 + (esc) |
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
110 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d | 1 + (esc) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
111 3 files changed, 3 insertions(+), 0 deletions(-) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
112 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
113 add branches/tags |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
114 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
115 $ hg branch $S |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
116 marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc) |
15615 | 117 (branches are permanent and global, did you want a bookmark?) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
118 $ hg tag $S |
21571
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
119 $ hg book -f $S |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
120 $ hg branch $M |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
121 marked working directory as branch MIDDLE_ |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
122 $ hg tag $M |
21571
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
123 $ hg book -f $M |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
124 $ hg branch $L |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
125 marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
126 $ hg tag $L |
21571
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
127 $ hg book -f $L |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
128 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
129 check alignment of branches |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
130 |
21570
d0ec3800101a
tests: fix cut and paste error on encoding alignment test
Matt Mackall <mpm@selenic.com>
parents:
17837
diff
changeset
|
131 $ hg branches |
d0ec3800101a
tests: fix cut and paste error on encoding alignment test
Matt Mackall <mpm@selenic.com>
parents:
17837
diff
changeset
|
132 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc) |
d0ec3800101a
tests: fix cut and paste error on encoding alignment test
Matt Mackall <mpm@selenic.com>
parents:
17837
diff
changeset
|
133 MIDDLE_ 4:9259be597f19 (inactive) |
d0ec3800101a
tests: fix cut and paste error on encoding alignment test
Matt Mackall <mpm@selenic.com>
parents:
17837
diff
changeset
|
134 \xe7\x9f\xad\xe5\x90\x8d 3:b06c5b6def9e (inactive) (esc) |
d0ec3800101a
tests: fix cut and paste error on encoding alignment test
Matt Mackall <mpm@selenic.com>
parents:
17837
diff
changeset
|
135 default 2:64a70663cee8 (inactive) |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
136 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
137 check alignment of tags |
11611
4f5a6df2af92
i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
138 |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
139 $ hg tags |
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
140 tip 5:d745ff46155b |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
141 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc) |
12418
09c6dd129f82
tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
142 MIDDLE_ 3:b06c5b6def9e |
12941
b911cb80c671
tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents:
12722
diff
changeset
|
143 \xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc) |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15615
diff
changeset
|
144 |
21571
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
145 check alignment of bookmarks |
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
146 |
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
147 $ hg book |
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
148 MIDDLE_ 5:d745ff46155b |
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
149 \xe7\x9f\xad\xe5\x90\x8d 4:9259be597f19 (esc) |
17da326fd041
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com>
parents:
21570
diff
changeset
|
150 * \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 5:d745ff46155b (esc) |