annotate tests/test-586.out @ 11297:d320e70442a5

replace Python standard textwrap by MBCS sensitive one for i18n text Mercurial has problem around text wrapping/filling in MBCS encoding environment, because standard 'textwrap' module of Python can not treat it correctly. It splits byte sequence for one character into two lines. According to unicode specification, "east asian width" classifies characters into: W(ide), N(arrow), F(ull-width), H(alf-width), A(mbiguous) W/N/F/H can be always recognized as 2/1/2/1 bytes in byte sequence, but 'A' can not. Size of 'A' depends on language in which it is used. Unicode specification says: If the context(= language) cannot be established reliably they should be treated as narrow characters by default but many of class 'A' characters are full-width, at least, in Japanese environment. So, this patch treats class 'A' characters as full-width always for safety wrapping. This patch focuses only on MBCS safe-ness, not on writing/printing rule strict wrapping for each languages MBCS sensitive textwrap class is originally implemented by ITO Nobuaki <daydream.trippers@gmail.com>.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 06 Jun 2010 17:20:10 +0900
parents f1af59451c0c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4535
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
1 adding a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
2 adding b
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
3 pulling from ../a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
4 searching for changes
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5 warning: repository is unrelated
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 adding changesets
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
7 adding manifests
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
8 adding file changes
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
9 added 1 changesets with 1 changes to 1 files (+1 heads)
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
10 (run 'hg heads' to see heads, 'hg merge' to merge)
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
12 (branch merge, don't forget to commit)
5764
8a5d8fb59ed2 Backed out changeset c2a21fe60994
Matt Mackall <mpm@selenic.com>
parents: 5762
diff changeset
13 C b
7564
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
14 % create test repos
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
15 adding a
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
16 adding b
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
17 pulling from ../repoa
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
18 requesting all changes
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
19 adding changesets
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
20 adding manifests
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
21 adding file changes
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
22 added 1 changesets with 1 changes to 1 files
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
23 (run 'hg update' to get a working copy)
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
25 pulling from ../repob
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
26 searching for changes
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
27 warning: repository is unrelated
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
28 adding changesets
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
29 adding manifests
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
30 adding file changes
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
31 added 1 changesets with 1 changes to 1 files (+1 heads)
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
32 (run 'hg heads' to see heads, 'hg merge' to merge)
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
33 % merge both repos
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
35 (branch merge, don't forget to commit)
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
36 % move b content
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
37 src/b
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 5764
diff changeset
38 tst/a