tests/test-rename-merge1.t
author Matt Mackall <mpm@selenic.com>
Mon, 20 Sep 2010 16:14:05 -0500
changeset 12347 6277a9469dff
parent 12298 f254204d8b8d
child 12683 ada47c38f4e5
permissions -rw-r--r--
bundlerepo: restore close() method
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12298
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     1
  $ hg init
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     3
  $ echo "[merge]" >> .hg/hgrc
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     4
  $ echo "followcopies = 1" >> .hg/hgrc
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     5
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     6
  $ echo foo > a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     7
  $ echo foo > a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     8
  $ hg add a a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     9
  $ hg ci -m "start"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    10
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    11
  $ hg mv a b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    12
  $ hg mv a2 b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    13
  $ hg ci -m "rename"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    14
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    15
  $ hg co 0
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    16
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    17
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    18
  $ echo blahblah > a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    19
  $ echo blahblah > a2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    20
  $ hg mv a2 c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    21
  $ hg ci -m "modify"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    22
  created new head
3153
c82ea81d6850 Add core copy detection algorithm
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
12298
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    24
  $ hg merge -y --debug
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    25
    searching for copies back to rev 1
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    26
    unmatched files in local:
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    27
     c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    28
    unmatched files in other:
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    29
     b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    30
     b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    31
    all copies found (* = to merge, ! = divergent):
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    32
     c2 -> a2 !
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    33
     b -> a *
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    34
     b2 -> a2 !
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    35
    checking for directory renames
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    36
   a2: divergent renames -> dr
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    37
  resolving manifests
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    38
   overwrite None partial False
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    39
   ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    40
   a: remote moved to b -> m
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    41
   b2: remote created -> g
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    42
  preserving a for resolve of b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    43
  removing a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    44
  updating: a 1/3 files (33.33%)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    45
  picked tool 'internal:merge' for b (binary False symlink False)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    46
  merging a and b to b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    47
  my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    48
   premerge successful
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    49
  updating: a2 2/3 files (66.67%)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    50
  warning: detected divergent renames of a2 to:
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    51
   c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    52
   b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    53
  updating: b2 3/3 files (100.00%)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    54
  getting b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    55
  1 files updated, 1 files merged, 0 files removed, 0 files unresolved
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    56
  (branch merge, don't forget to commit)
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    57
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    58
  $ hg status -AC
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    59
  M b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    60
    a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    61
  M b2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    62
  R a
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    63
  C c2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    64
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    65
  $ cat b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    66
  blahblah
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    67
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    68
  $ hg ci -m "merge"
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    69
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    70
  $ hg debugindex .hg/store/data/b.i
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    71
     rev    offset  length   base linkrev nodeid       p1           p2
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    72
       0         0      67      0       1 57eacc201a7f 000000000000 000000000000
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    73
       1        67      72      1       3 4727ba907962 000000000000 57eacc201a7f
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    74
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    75
  $ hg debugrename b
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    76
  b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
f254204d8b8d tests: unify test-rename-merge1
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    77