tests/test-casecollision-merge.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 16 Apr 2014 14:09:35 -0400
changeset 21130 1ff06386217f
parent 19801 41abe2e3e3b7
child 22046 7a9cbb315d84
permissions -rw-r--r--
bundle2: introduce `replycaps` part for on-demand reply The bundle2 processing does not create a bundle2 reply by default anymore. It is only done if the client requests it with a `replycaps` part. This part is called `replycaps` as it will eventually contain data about which bundle2 capabilities are supported by the client. We have to add a flag to the test command to control whether a reply is generated or not.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     1
run only on case-insensitive filesystems
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     2
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     3
  $ "$TESTDIR/hghave" icasefs || exit 80
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     4
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     5
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     6
test for branch merging
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     7
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     8
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
     9
test for rename awareness of case-folding collision check:
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    10
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    11
(1) colliding file is one renamed from collided file:
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    12
this is also case for issue3370.
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    13
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
    14
  $ hg init branch_merge_renaming
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
    15
  $ cd branch_merge_renaming
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    16
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    17
  $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    18
  $ hg add a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    19
  $ echo b > b
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    20
  $ hg add b
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    21
  $ hg commit -m '#0'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    22
  $ hg tag -l A
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    23
  $ hg rename a tmp
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    24
  $ hg rename tmp A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    25
  $ hg commit -m '#1'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    26
  $ hg tag -l B
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    27
  $ hg update -q 0
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    28
  $ touch x
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    29
  $ hg add x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    30
  $ hg commit -m '#2'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    31
  created new head
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    32
  $ hg tag -l C
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
    33
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    34
  $ hg merge -q
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    35
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    36
  M A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    37
  R a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    38
  C b
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    39
  C x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    40
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    41
  $ hg update -q --clean 1
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    42
  $ hg merge -q
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    43
  $ hg status -A
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    44
  M x
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    45
  C A
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    46
  C b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    47
  $ hg commit -m '(D)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    48
  $ hg tag -l D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    49
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    50
additional test for issue3452:
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    51
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    52
| this assumes the history below.
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    53
|
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    54
|  (A) -- (C) -- (E) -------
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    55
|      \      \             \
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    56
|       \      \             \
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    57
|         (B) -- (D) -- (F) -- (G)
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    58
|
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    59
|   A: add file 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    60
|   B: rename from 'a' to 'A'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    61
|   C: add 'x' (or operation other than modification of 'a')
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    62
|   D: merge C into B
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    63
|   E: modify 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    64
|   F: modify 'A'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    65
|   G: merge E into F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    66
|
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    67
| issue3452 occurs when (B) is recorded before (C)
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    68
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    69
  $ hg update -q --clean C
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    70
  $ echo "modify 'a' at (E)" > a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    71
  $ echo "modify 'b' at (E)" > b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    72
  $ hg commit -m '(E)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    73
  created new head
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    74
  $ hg tag -l E
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    75
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    76
  $ hg update -q --clean D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    77
  $ echo "modify 'A' at (F)" > A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    78
  $ hg commit -m '(F)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    79
  $ hg tag -l F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    80
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    81
  $ hg merge -q --tool internal:other E
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    82
  $ hg status -A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    83
  M A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    84
    a
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    85
  M b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    86
  C x
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    87
  $ cat A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    88
  modify 'a' at (E)
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    89
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    90
test also the case that (B) is recorded after (C), to prevent
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    91
regression by changes in the future.
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    92
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    93
to avoid unexpected (successful) behavior by filelog unification,
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    94
target file is not 'a'/'A' but 'b'/'B' in this case.
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    95
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    96
  $ hg update -q --clean A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    97
  $ hg rename b tmp
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    98
  $ hg rename tmp B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    99
  $ hg commit -m '(B1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   100
  created new head
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   101
  $ hg tag -l B1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   102
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   103
  $ hg merge -q C
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   104
  $ hg status -A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   105
  M x
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   106
  C B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   107
  C a
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   108
  $ hg commit -m '(D1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   109
  $ hg tag -l D1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   110
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   111
  $ echo "modify 'B' at (F1)" > B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   112
  $ hg commit -m '(F1)'
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   113
  $ hg tag -l F1
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   114
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   115
  $ hg merge -q --tool internal:other E
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   116
  $ hg status -A
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   117
  M B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   118
    b
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   119
  M a
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   120
  C x
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   121
  $ cat B
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   122
  modify 'b' at (E)
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   123
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   124
  $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   125
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   126
(2) colliding file is not related to collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   127
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   128
  $ hg init branch_merge_collding
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   129
  $ cd branch_merge_collding
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   130
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   131
  $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   132
  $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   133
  $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   134
  $ hg remove a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   135
  $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   136
  $ echo A > A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   137
  $ hg add A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   138
  $ hg commit -m '#2'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   139
  $ hg update --clean 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   140
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   141
  $ echo x > x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   142
  $ hg add x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   143
  $ hg commit -m '#3'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   144
  created new head
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   145
  $ echo 'modified at #4' > a
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   146
  $ hg commit -m '#4'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   147
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   148
  $ hg merge
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
   149
  abort: case-folding collision between a and A
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   150
  [255]
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   151
  $ hg parents --template '{rev}\n'
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   152
  4
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   153
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   154
  C a
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   155
  C x
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   156
  $ cat a
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   157
  modified at #4
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   158
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   159
  $ hg update --clean 2
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   160
  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   161
  $ hg merge
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   162
  abort: case-folding collision between a and A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   163
  [255]
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   164
  $ hg parents --template '{rev}\n'
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   165
  2
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   166
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   167
  C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   168
  $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   169
  A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   170
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   171
test for deletion awareness of case-folding collision check (issue3648):
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   172
revision '#3' doesn't change 'a', so 'a' should be recognized as
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   173
safely removed in merging between #2 and #3.
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   174
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   175
  $ hg update --clean 3
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   176
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   177
  $ hg merge 2
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   178
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   179
  (branch merge, don't forget to commit)
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   180
  $ hg status -A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   181
  M A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   182
  R a
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   183
  C x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   184
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   185
  $ hg update --clean 2
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   186
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   187
  $ hg merge 3
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   188
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   189
  (branch merge, don't forget to commit)
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   190
  $ hg status -A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   191
  M x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   192
  C A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   193
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   194
  $ cd ..
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   195
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   196
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   197
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   198
test for linear updates
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   199
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   200
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   201
test for rename awareness of case-folding collision check:
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   202
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   203
(1) colliding file is one renamed from collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   204
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   205
  $ hg init linearupdate_renameaware_1
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   206
  $ cd linearupdate_renameaware_1
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   207
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   208
  $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   209
  $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   210
  $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   211
  $ hg rename a tmp
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   212
  $ hg rename tmp A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   213
  $ hg commit -m '#1'
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   214
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   215
  $ hg update 0
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   216
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   217
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   218
  $ echo 'this is added line' >> a
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   219
  $ hg update 1
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   220
  merging a and A to A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   221
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   222
  $ hg status -A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   223
  M A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   224
  $ cat A
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   225
  a
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   226
  this is added line
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   227
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   228
  $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   229
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   230
(2) colliding file is not related to collided file
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   231
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   232
  $ hg init linearupdate_renameaware_2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   233
  $ cd linearupdate_renameaware_2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   234
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   235
  $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   236
  $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   237
  $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   238
  $ hg remove a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   239
  $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   240
  $ echo A > A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   241
  $ hg add A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   242
  $ hg commit -m '#2'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   243
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   244
  $ hg update 0
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   245
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   246
  $ hg parents --template '{rev}\n'
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   247
  0
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   248
  $ hg status -A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   249
  C a
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   250
  $ cat A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   251
  a
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   252
  $ hg up -qC 2
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   253
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   254
  $ hg update --check 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   255
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   256
  $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   257
  0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   258
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   259
  C a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   260
  $ cat a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   261
  a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   262
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   263
  $ hg update --clean 2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   264
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   265
  $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   266
  2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   267
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   268
  C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   269
  $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   270
  A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   271
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   272
  $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   273
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   274
(3) colliding file is not related to collided file: added in working dir
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   275
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   276
  $ hg init linearupdate_renameaware_3
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   277
  $ cd linearupdate_renameaware_3
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   278
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   279
  $ echo a > a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   280
  $ hg add a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   281
  $ hg commit -m '#0'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   282
  $ hg rename a b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   283
  $ hg commit -m '#1'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   284
  $ hg update 0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   285
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   286
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   287
  $ echo B > B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   288
  $ hg add B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   289
  $ hg status
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   290
  A B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   291
  $ hg update
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   292
  abort: case-folding collision between b and B
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   293
  [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   294
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   295
  $ hg update --check
19801
41abe2e3e3b7 update: standardize error message for dirty update --check
Siddharth Agarwal <sid0@fb.com>
parents: 19106
diff changeset
   296
  abort: uncommitted changes
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   297
  [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   298
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   299
  $ hg update --clean
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   300
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   301
  $ hg parents --template '{rev}\n'
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   302
  1
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   303
  $ hg status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   304
  C b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   305
  $ cat b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   306
  a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   307
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   308
  $ cd ..