view tests/test-commit-copy.t @ 15551:1fa41d1f1351 stable

posix: add extended support for OS X path folding OS X does the following transformation on paths for comparisons: a) 8-bit strings are decoded as UTF-8 to UTF-16 b) undecodable bytes are percent-escaped c) accented characters are converted to NFD decomposed form, approximately d) characters are converted to _lowercase_ using internal tables Both (c) and (d) are done using internal tables that vary from release to release and match Unicode specs to greater or lesser extent. We approximate these functions using Python's internal Unicode data. With this change, Mercurial will (in almost all cases) match OS X folding and not report unknown file aliases for files in UTF-8 or other encodings.
author Matt Mackall <mpm@selenic.com>
date Tue, 22 Nov 2011 17:26:32 -0600
parents ec5886db9dc6
children
line wrap: on
line source

  $ hg init dir
  $ cd dir
  $ echo bleh > bar
  $ hg add bar
  $ hg ci -m 'add bar'

  $ hg cp bar foo
  $ echo >> bar
  $ hg ci -m 'cp bar foo; change bar'

  $ hg debugrename foo
  foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
  $ hg debugindex bar
     rev    offset  length   base linkrev nodeid       p1           p2
       0         0       6      0       0 26d3ca0dfd18 000000000000 000000000000
       1         6       7      1       1 d267bddd54f7 26d3ca0dfd18 000000000000