tests/test-conflict.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sat, 27 Aug 2011 04:56:12 +0900
branchstable
changeset 15066 24efa83d81cb
parent 12316 4134686b83e1
child 15501 2371f4aea665
permissions -rw-r--r--
i18n: calculate terminal columns by width information of each characters neither number of 'bytes' in any encoding nor 'characters' is appropriate to calculate terminal columns for specified string. this patch modifies MBTextWrapper for: - overriding '_wrap_chunks()' to make it use not built-in 'len()' but 'encoding.colwidth()' for columns of string - fixing '_cutdown()' to make it use 'encoding.colwidth()' instead of local, similar but incorrect implementation this patch also modifies 'encoding.py': - dividing 'colwith()' into 2 pieces: one for calculation columns of specified UNICODE string, and another for rest part of original one. the former is used from MBTextWrapper in 'util.py'. - preventing 'colwidth()' from evaluating HGENCODINGAMBIGUOUS configuration per each invocation: 'unicodedata.east_asian_width' checking is kept intact for reducing startup cost.

  $ hg init
  $ echo "nothing" > a
  $ hg add a
  $ hg commit -m ancestor
  $ echo "something" > a
  $ hg commit -m branch1
  $ hg co 0
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo "something else" > a
  $ hg commit -m branch2
  created new head

  $ hg merge 1
  merging a
  warning: conflicts during merge.
  merging a failed!
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
  [1]

  $ hg id
  32e80765d7fe+75234512624c+ tip

  $ cat a
  <<<<<<< local
  something else
  =======
  something
  >>>>>>> other

  $ hg status
  M a
  ? a.orig