tests/test-encoding-align.t
author A. S. Budden <abudden@gmail.com>
Fri, 30 Mar 2012 22:08:46 +0100
changeset 16324 46b991a1f428
parent 15615 41885892796e
child 16913 f2719b387380
permissions -rw-r--r--
record: allow splitting of hunks by manually editing patches It is possible that unrelated changes in a file are on sequential lines. The current record extension does not allow these to be committed independently. An example use case for this is in software development for deeply embedded real-time systems. In these environments, it is not always possible to use a debugger (due to time-constraints) and hence inline UART-based printing is often used. When fixing a bug in a module, it is often convenient to add a large number of 'printf's (linked to the UART via a custom fputc) to the module in order to work out what is going wrong. printf is a very slow function (and also variadic so somewhat frowned upon by the MISRA standard) and hence it is highly undesirable to commit these lines to the repository. If only a partial fix is implemented, however, it is desirable to commit the fix without deleting all of the printf lines. This is also simplifies removal of the printf lines as once the final fix is committed, 'hg revert' does the rest. It is likely that the printf lines will be very near the actual fix, so being able to split the hunk is very useful in this case. There were two alternatives I considered for the user interface. One was to manually edit the patch, the other to allow a hunk to be split into individual lines for consideration. The latter option would require a significant refactor of the record module and is less flexible. While the former is potentially more complicated to use, this is a feature that is likely to only be used in certain exceptional cases (such as the use case proposed above) and hence I felt that the complexity would not be a considerable issue. I've also written a follow-up patch that refactors the 'prompt' code to base everything on the choices variable. This tidies up and clarifies the code a bit (removes constructs like 'if ret == 7' and removes the 'e' option from the file scope options as it's not relevant there. It's not really a necessity, so I've excluded it from this submission for now, but I can send it separately if there's a desire and it's on bitbucket (see below) in the meantime. Possible future improvements include: * Tidying up the 'prompt' code to base everything on the choices variable. This would allow entries to be removed from the prompt as currently 'e' is offered even for entire file patches, which is currently unsupported. * Allowing the entire file (or even multi-file) patch to be edited manually: this would require quite a large refactor without much benefit, so I decided to exclude it from the initial submission. * Allow the option to retry if a patch fails to apply (this is what Git does). This would require quite a bit of refactoring given the current 'hg record' implementation, so it's debatable whether it's worth it. Output is similar to existing record user interface except that an additional option ('e') exists to allow manual editing of the patch. This opens the user's configured editor with the patch. A comment is added to the bottom of the patch explaining what to do (based on Git's one). A large proportion of the changeset is test-case changes to update the options reported by record (Ynesfdaq? instead of Ynsfdaq?). Functional changes are in record.py and there are some new test cases in test-record.t.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    19
  > def showoptlist(ui, repo, *pats, **opts):
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    20
  >     '''dummy command to show option descriptions'''
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    21
  >     return 0
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    22
  > cmdtable = {
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    23
  >     'showoptlist':
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    24
  >         (showoptlist,
15031
0cb27eda3a1e util: wrap lines with multi-byte characters correctly (issue2943)
Mads Kiilerich <mads@kiilerich.com>
parents: 12941
diff changeset
    25
  >          [('s', 'opt1', '', 'short width'  + ' %(s)s' * 8, '%(s)s'),
0cb27eda3a1e util: wrap lines with multi-byte characters correctly (issue2943)
Mads Kiilerich <mads@kiilerich.com>
parents: 12941
diff changeset
    26
  >           ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'),
0cb27eda3a1e util: wrap lines with multi-byte characters correctly (issue2943)
Mads Kiilerich <mads@kiilerich.com>
parents: 12941
diff changeset
    27
  >           ('l', 'opt3', '', 'long width'   + ' %(l)s' * 8, '%(l)s')
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    28
  >          ],
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    29
  >          ""
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    30
  >         )
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    31
  > }
15031
0cb27eda3a1e util: wrap lines with multi-byte characters correctly (issue2943)
Mads Kiilerich <mads@kiilerich.com>
parents: 12941
diff changeset
    32
  > """ % globals())
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    33
  > f.close()
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    34
  > EOF
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    35
  $ S=`cat s`
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    36
  $ M=`cat m`
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    37
  $ L=`cat l`
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    38
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    39
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
    40
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    41
  $ cat <<EOF > .hg/hgrc
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    42
  > [extensions]
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    43
  > ja_ext = `pwd`/showoptlist.py
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    44
  > EOF
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    45
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    46
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
    47
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    48
  $ 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
    49
  hg showoptlist
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    50
  
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    51
  dummy command to show option descriptions
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    52
  
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    53
  options:
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    54
  
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 15066
diff changeset
    55
   -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
    56
   -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
    57
                          MIDDLE_ MIDDLE_ MIDDLE_
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 15066
diff changeset
    58
   -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
    59
                          \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
    60
                          \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
    61
  
15202
0150741caace help: unify the two -v notes for command help
Matt Mackall <mpm@selenic.com>
parents: 15145
diff changeset
    62
  use "hg -v help showoptlist" to show more info
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    63
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    64
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    65
  $ rm -f s; touch s
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    66
  $ rm -f m; touch m
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    67
  $ rm -f l; touch l
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    68
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    69
add files
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    70
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    71
  $ cp s $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    72
  $ hg add $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    73
  $ cp m $M
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    74
  $ hg add $M
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    75
  $ cp l $L
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    76
  $ hg add $L
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    77
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    78
commit(1)
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    79
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    80
  $ echo 'first line(1)' >> s; cp s $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    81
  $ echo 'first line(2)' >> m; cp m $M
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    82
  $ echo 'first line(3)' >> l; cp l $L
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    83
  $ hg commit -m 'first commit' -u $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    84
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    85
commit(2)
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    86
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    87
  $ echo 'second line(1)' >> s; cp s $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    88
  $ echo 'second line(2)' >> m; cp m $M
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    89
  $ echo 'second line(3)' >> l; cp l $L
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    90
  $ 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
    91
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    92
commit(3)
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    93
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    94
  $ echo 'third line(1)' >> s; cp s $S
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  $ echo 'third line(2)' >> m; cp m $M
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    96
  $ echo 'third line(3)' >> l; cp l $L
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    97
  $ 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
    98
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    99
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
   100
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   101
  $ hg annotate -u $M
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   102
          \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
   103
       MIDDLE_: second line(2)
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   104
  \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
   105
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   106
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
   107
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   108
  $ hg diff -c tip --stat
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   109
   MIDDLE_      |  1 +
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   110
   \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
   111
   \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
   112
   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
   113
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   114
add branches/tags
11611
4f5a6df2af92 i18n: use encoding.colwidth() for correct column width
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   115
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   116
  $ hg branch $S
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   117
  marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15203
diff changeset
   118
  (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
   119
  $ hg tag $S
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_
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15203
diff changeset
   122
  (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
   123
  $ hg tag $M
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)
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15203
diff changeset
   126
  (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
   127
  $ hg tag $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
12418
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   131
  $ hg tags
09c6dd129f82 tests: unify test-encoding-align
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   132
  tip                                5:d745ff46155b
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   133
  \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
   134
  MIDDLE_                            3:b06c5b6def9e
12941
b911cb80c671 tests: use (esc) markup for string-escape
Mads Kiilerich <mads@kiilerich.com>
parents: 12722
diff changeset
   135
  \xe7\x9f\xad\xe5\x90\x8d                               2:64a70663cee8 (esc)
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)