tests/test-casecollision-merge.t
branchstable
changeset 19105 c60a7f5a741f
parent 19104 370d9ea027b1
child 19106 3d0dd890c525
equal deleted inserted replaced
19104:370d9ea027b1 19105:c60a7f5a741f
    15   $ cd branch_merge_renaming
    15   $ cd branch_merge_renaming
    16 
    16 
    17   $ echo a > a
    17   $ echo a > a
    18   $ hg add a
    18   $ hg add a
    19   $ hg commit -m '#0'
    19   $ hg commit -m '#0'
       
    20   $ hg tag -l A
    20   $ hg rename a tmp
    21   $ hg rename a tmp
    21   $ hg rename tmp A
    22   $ hg rename tmp A
    22   $ hg commit -m '#1'
    23   $ hg commit -m '#1'
       
    24   $ hg tag -l B
    23   $ hg update -q 0
    25   $ hg update -q 0
    24   $ touch x
    26   $ touch x
    25   $ hg add x
    27   $ hg add x
    26   $ hg commit -m '#2'
    28   $ hg commit -m '#2'
    27   created new head
    29   created new head
       
    30   $ hg tag -l C
    28 
    31 
    29   $ hg merge -q
    32   $ hg merge -q
    30   $ hg status -A
    33   $ hg status -A
    31   M A
    34   M A
    32   R a
    35   R a
    35   $ hg update -q --clean 1
    38   $ hg update -q --clean 1
    36   $ hg merge -q
    39   $ hg merge -q
    37   $ hg status -A
    40   $ hg status -A
    38   M x
    41   M x
    39   C A
    42   C A
       
    43   $ hg commit -m '(D)'
       
    44   $ hg tag -l D
       
    45 
       
    46 additional test for issue3452:
       
    47 
       
    48 | this assumes the history below.
       
    49 |
       
    50 |  (A) -- (C) -- (E) -------
       
    51 |      \      \             \
       
    52 |       \      \             \
       
    53 |         (B) -- (D) -- (F) -- (G)
       
    54 |
       
    55 |   A: add file 'a'
       
    56 |   B: rename from 'a' to 'A'
       
    57 |   C: add 'x' (or operation other than modification of 'a')
       
    58 |   D: merge C into B
       
    59 |   E: modify 'a'
       
    60 |   F: modify 'A'
       
    61 |   G: merge E into F
       
    62 |
       
    63 | issue3452 occurs when (B) is recorded before (C)
       
    64 
       
    65   $ hg update -q --clean C
       
    66   $ echo "modify 'a' at (E)" > a
       
    67   $ hg commit -m '(E)'
       
    68   created new head
       
    69   $ hg tag -l E
       
    70 
       
    71   $ hg update -q --clean D
       
    72   $ echo "modify 'A' at (F)" > A
       
    73   $ hg commit -m '(F)'
       
    74   $ hg tag -l F
       
    75 
       
    76   $ hg merge -q --tool internal:other E
       
    77   $ hg status -A
       
    78   M A
       
    79     a
       
    80   C x
       
    81   $ cat A
       
    82   modify 'a' at (E)
    40 
    83 
    41   $ cd ..
    84   $ cd ..
    42 
    85 
    43 (2) colliding file is not related to collided file
    86 (2) colliding file is not related to collided file
    44 
    87 
    61   created new head
   104   created new head
    62   $ echo 'modified at #4' > a
   105   $ echo 'modified at #4' > a
    63   $ hg commit -m '#4'
   106   $ hg commit -m '#4'
    64 
   107 
    65   $ hg merge
   108   $ hg merge
    66   abort: case-folding collision between A and a
   109   abort: case-folding collision between a and A
    67   [255]
   110   [255]
    68   $ hg parents --template '{rev}\n'
   111   $ hg parents --template '{rev}\n'
    69   4
   112   4
    70   $ hg status -A
   113   $ hg status -A
    71   C a
   114   C a