tests/test-casefolding.t
author Matt Mackall <mpm@selenic.com>
Sat, 31 Mar 2012 11:19:09 -0500
changeset 16326 b95b006e18cc
parent 16318 73f4e05287b4
parent 16323 0789d1bbf6c1
child 16542 e596a631210e
permissions -rw-r--r--
merge with stable
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
     1
  $ "$TESTDIR/hghave" icasefs || exit 80
6806
2134d6c09432 Add test for case folding issues
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
15538
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
     3
  $ hg debugfs | grep 'case-sensitive:'
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
     4
  case-sensitive: no
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
     5
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
     6
test file addition with bad case
6806
2134d6c09432 Add test for case folding issues
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     7
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
     8
  $ hg init repo1
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
     9
  $ cd repo1
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    10
  $ echo a > a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    11
  $ hg add A
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    12
  adding a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    13
  $ hg st
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    14
  A a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    15
  $ hg ci -m adda
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    16
  $ hg manifest
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    17
  a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    18
  $ cd ..
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    19
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    20
test case collision on rename (issue750)
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    21
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    22
  $ hg init repo2
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    23
  $ cd repo2
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    24
  $ echo a > a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    25
  $ hg --debug ci -Am adda
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    26
  adding a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    27
  a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    28
  committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9
16288
09f2bb3a37b5 tests: remove case-folding false positive
Matt Mackall <mpm@selenic.com>
parents: 15894
diff changeset
    29
09f2bb3a37b5 tests: remove case-folding false positive
Matt Mackall <mpm@selenic.com>
parents: 15894
diff changeset
    30
Case-changing renames should work:
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    31
16288
09f2bb3a37b5 tests: remove case-folding false positive
Matt Mackall <mpm@selenic.com>
parents: 15894
diff changeset
    32
  $ hg mv a A
09f2bb3a37b5 tests: remove case-folding false positive
Matt Mackall <mpm@selenic.com>
parents: 15894
diff changeset
    33
  $ hg mv A a
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    34
  $ hg st
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    35
  $ cd ..
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    36
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    37
test case collision between revisions (issue912)
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    38
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    39
  $ hg init repo3
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    40
  $ cd repo3
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    41
  $ echo a > a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    42
  $ hg ci -Am adda
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    43
  adding a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    44
  $ hg rm a
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    45
  $ hg ci -Am removea
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    46
  $ echo A > A
6806
2134d6c09432 Add test for case folding issues
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    47
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    48
on linux hfs keeps the old case stored, force it
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    49
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    50
  $ mv a aa
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    51
  $ mv aa A
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    52
  $ hg ci -Am addA
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    53
  adding A
6806
2134d6c09432 Add test for case folding issues
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    54
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    55
used to fail under case insensitive fs
6806
2134d6c09432 Add test for case folding issues
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    56
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    57
  $ hg up -C 0
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    58
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    59
  $ hg up -C
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    60
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
15538
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    61
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    62
no clobbering of untracked files with wrong casing
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    63
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    64
  $ hg up -r null
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    65
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    66
  $ echo gold > a
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    67
  $ hg up
16284
2b0a406d3043 merge: fix unknown file merge detection for case-folding systems
Matt Mackall <mpm@selenic.com>
parents: 15894
diff changeset
    68
  A: untracked file differs
15894
44fa047cef57 merge: report all files in _checkunknown
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 15538
diff changeset
    69
  abort: untracked files in working directory differ from files in requested revision
15538
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    70
  [255]
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    71
  $ cat a
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    72
  gold
b0a88bda3381 update: don't clobber untracked files with wrong casing
Mads Kiilerich <mads@kiilerich.com>
parents: 12603
diff changeset
    73
12603
f1646efc54a6 tests: unify test-casefolding
Brodie Rao <brodie@bitheap.org>
parents: 9396
diff changeset
    74
  $ cd ..
16313
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    75
16323
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    76
issue 3342: file in nested directory causes unexpected abort
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    77
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    78
  $ hg init issue3342
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    79
  $ cd issue3342
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    80
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    81
  $ mkdir -p a/B/c/D
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    82
  $ echo e > a/B/c/D/e
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    83
  $ hg add a/B/c/D/e
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    84
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    85
  $ cd ..
0789d1bbf6c1 dirstate: fix some problems for recursive case normalization (issue3342)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16313
diff changeset
    86
16313
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    87
issue 3340: mq does not handle case changes correctly
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    88
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    89
in addition to reported case, 'hg qrefresh' is also tested against
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    90
case changes.
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    91
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    92
  $ echo "[extensions]" >> $HGRCPATH
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    93
  $ echo "mq=" >> $HGRCPATH
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    94
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    95
  $ hg init issue3340
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    96
  $ cd issue3340
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    97
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    98
  $ echo a > mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
    99
  $ hg add mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   100
  $ hg commit -m '#0'
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   101
  $ hg rename mIxEdCaSe tmp
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   102
  $ hg rename tmp MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   103
  $ hg status -A
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   104
  A MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   105
    mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   106
  R mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   107
  $ hg qnew changecase
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   108
  $ hg status -A
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   109
  C MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   110
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   111
  $ hg qpop -a
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   112
  popping changecase
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   113
  patch queue now empty
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   114
  $ hg qnew refresh-casechange
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   115
  $ hg status -A
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   116
  C mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   117
  $ hg rename mIxEdCaSe tmp
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   118
  $ hg rename tmp MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   119
  $ hg status -A
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   120
  A MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   121
    mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   122
  R mIxEdCaSe
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   123
  $ hg qrefresh
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   124
  $ hg status -A
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   125
  C MiXeDcAsE
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   126
e785456f9631 dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16288
diff changeset
   127
  $ cd ..