tests/test-casecollision-merge.t
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 26 Sep 2015 21:43:13 -0700
changeset 26380 56a640b0f656
parent 22046 7a9cbb315d84
child 26660 7e1baad90121
permissions -rw-r--r--
revlog: don't flush data file after every added revision The current behavior of revlogs is to flush the data file when writing data to it. Tracing system calls revealed that changegroup processing incurred numerous write(2) calls for values much smaller than the default buffer size (Python defaults to 4096, but it can be adjusted based on detected block size at run time by CPython). The reason we flush revlogs is so readers have all data available. For example, the current code in revlog.py will re-open the revlog file (instead of seeking an existing file handle) to read the text of a revision. This happens when starting a new delta chain when adding several revisions from changegroups, for example. Yes, this is likely sub-optimal (we should probably be sharing file descriptors between readers and writers to avoid the flushing and associated overhead of re-opening files). While flushing revlogs is necessary, it appears all callers are diligent about flushing files before a read is performed (see buildtext() in _addrevision()), making the flush in _writeentry() redundant and unncessary. So, we remove it. In practice, this means we incur a write(2) a) when the buffer is full (typically 4096 bytes) b) when a new delta chain is created rather than after every added revision. This applies to every revlog, but by volume it mostly impacts filelogs. Removing the redundant flush from _writeentry() significantly reduces the number of write(2) calls during changegroup processing on my Linux machine. When applying a changegroup of the hg repo based on my local repo, the total number of write(2) calls during application of the mercurial/localrepo.py revlogs dropped from 1,320 to 217 with this patch applied. Total I/O related system calls dropped from 1,577 to 474. When unbundling a mozilla-central gzipped bundle (264,403 changesets with 1,492,215 changes to 222,507 files), total write(2) calls dropped from 1,252,881 to 827,106 and total system calls dropped from 3,601,259 to 3,178,636 - a reduction of 425,775! While the system call reduction is significant, it appears to have no impact on wall time on my Linux and Windows machines. Still, fewer syscalls is fewer syscalls. Surely this can't hurt. If nothing else, it makes examining remaining system call usage simpler and opens the door to experimenting with the performance impact of different buffer sizes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 19801
diff changeset
     1
#require icasefs
15673
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
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     4
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
     5
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
     6
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
     7
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
     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
(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
    10
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
    11
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
    12
  $ 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
    13
  $ 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
    14
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    15
  $ 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
    16
  $ 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
    17
  $ 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
    18
  $ 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
    19
  $ hg commit -m '#0'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    20
  $ 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
    21
  $ 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
    22
  $ 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
    23
  $ hg commit -m '#1'
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    24
  $ 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
    25
  $ 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
    26
  $ 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
    27
  $ 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
    28
  $ 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
    29
  created new head
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    30
  $ 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
    31
19104
370d9ea027b1 icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17889
diff changeset
    32
  $ 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
    33
  $ 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
    34
  M A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
    35
  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
    36
  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
    37
  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
    38
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
  $ 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
    40
  $ 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
    41
  $ 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
    42
  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
    43
  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
    44
  C b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    45
  $ hg commit -m '(D)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    46
  $ hg tag -l D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    47
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    48
additional test for issue3452:
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
| this assumes the history below.
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
|  (A) -- (C) -- (E) -------
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
|       \      \             \
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    55
|         (B) -- (D) -- (F) -- (G)
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
|   A: add file 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    58
|   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
    59
|   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
    60
|   D: merge C into B
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    61
|   E: modify 'a'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    62
|   F: modify 'A'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    63
|   G: merge E into F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    64
|
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    65
| 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
    66
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    67
  $ hg update -q --clean C
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    68
  $ 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
    69
  $ 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
    70
  $ hg commit -m '(E)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    71
  created new head
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    72
  $ hg tag -l E
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    73
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    74
  $ hg update -q --clean D
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    75
  $ 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
    76
  $ hg commit -m '(F)'
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    77
  $ hg tag -l F
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    78
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    79
  $ 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
    80
  $ hg status -A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    81
  M A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    82
    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
    83
  M b
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    84
  C x
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    85
  $ cat A
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
    86
  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
    87
19106
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    88
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
    89
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
    90
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    91
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
    92
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
    93
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
    94
  $ 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
    95
  $ 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
    96
  $ 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
    97
  $ 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
    98
  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
    99
  $ 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
   100
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 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
   102
  $ 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
   103
  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
   104
  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
   105
  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
   106
  $ 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
   107
  $ 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
   108
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   109
  $ 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
   110
  $ 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
   111
  $ 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
   112
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 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
   114
  $ 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
   115
  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
   116
    b
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 a
3d0dd890c525 icasefs: enhance test to prevent regression by changes in the future
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19105
diff changeset
   118
  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
   119
  $ 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
   120
  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
   121
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   122
  $ cd ..
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   123
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   124
(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
   125
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   126
  $ 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
   127
  $ 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
   128
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   129
  $ 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
   130
  $ 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
   131
  $ 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
   132
  $ 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
   133
  $ 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
   134
  $ 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
   135
  $ 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
   136
  $ 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
   137
  $ 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
   138
  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
   139
  $ 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
   140
  $ 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
   141
  $ 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
   142
  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
   143
  $ 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
   144
  $ 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
   145
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   146
  $ hg merge
19105
c60a7f5a741f icasefs: rewrite case-folding collision detection (issue3452)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19104
diff changeset
   147
  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
   148
  [255]
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   149
  $ 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
   150
  4
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 status -A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   152
  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
   153
  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
   154
  $ 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
   155
  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
   156
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   157
  $ 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
   158
  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
   159
  $ hg merge
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   160
  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
   161
  [255]
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   162
  $ 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
   163
  2
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   164
  $ 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
   165
  C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   166
  $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   167
  A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   168
17889
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   169
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
   170
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
   171
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
   172
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   173
  $ 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
   174
  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
   175
  $ 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
   176
  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
   177
  (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
   178
  $ 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
   179
  M A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   180
  R a
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   181
  C x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   182
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   183
  $ 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
   184
  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
   185
  $ 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
   186
  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
   187
  (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
   188
  $ 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
   189
  M x
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   190
  C A
ce7bc04d863b icasefs: make case-folding collision detection as deletion aware (issue3648)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16492
diff changeset
   191
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   192
  $ cd ..
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   193
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   194
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   195
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   196
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
   197
################################
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   198
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   199
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
   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
(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
   202
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   203
  $ 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
   204
  $ 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
   205
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   206
  $ 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
   207
  $ 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
   208
  $ 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
   209
  $ 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
   210
  $ 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
   211
  $ 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
   212
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   213
  $ 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
   214
  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
   215
16478
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   216
  $ 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
   217
  $ hg update 1
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   218
  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
   219
  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
   220
  $ hg status -A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   221
  M A
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   222
  $ 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
   223
  a
15673
d550168f11ce merge: check filename case collision between changesets for branch merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
   224
  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
   225
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   226
  $ cd ..
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
(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
   229
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   230
  $ 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
   231
  $ 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
   232
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   233
  $ 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
   234
  $ 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
   235
  $ 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
   236
  $ 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
   237
  $ 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
   238
  $ 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
   239
  $ 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
   240
  $ 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
   241
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   242
  $ 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
   243
  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
   244
  $ 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
   245
  0
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 status -A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   247
  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
   248
  $ cat A
16492
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   249
  a
774e2dcd0a65 update: fix case-collision with a clean wd and no --clean
Patrick Mezard <patrick@mezard.eu>
parents: 16478
diff changeset
   250
  $ 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
   251
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   252
  $ 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
   253
  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
   254
  $ 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
   255
  0
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   256
  $ 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
   257
  C a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   258
  $ cat a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   259
  a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   260
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   261
  $ 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
   262
  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
   263
  $ 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
   264
  2
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   265
  $ 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
   266
  C A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   267
  $ cat A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   268
  A
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   269
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   270
  $ cd ..
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
(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
   273
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   274
  $ 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
   275
  $ 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
   276
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   277
  $ 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
   278
  $ 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
   279
  $ 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
   280
  $ 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
   281
  $ 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
   282
  $ 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
   283
  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
   284
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   285
  $ 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
   286
  $ 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
   287
  $ hg status
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   288
  A 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 update
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   290
  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
   291
  [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   292
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   293
  $ hg update --check
19801
41abe2e3e3b7 update: standardize error message for dirty update --check
Siddharth Agarwal <sid0@fb.com>
parents: 19106
diff changeset
   294
  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
   295
  [255]
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   296
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   297
  $ 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
   298
  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
   299
  $ 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
   300
  1
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   301
  $ 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
   302
  C b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   303
  $ cat b
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   304
  a
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   305
cbf2ea2f5ca1 icasefs: make case-folding collision detection as rename aware (issue3370)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15673
diff changeset
   306
  $ cd ..