tests/test-merge-criss-cross.t
author Simon Farnsworth <simonfar@fb.com>
Mon, 06 Mar 2017 03:19:40 -0800
changeset 31204 84e8a6834223
parent 30856 41f6af50c0d8
child 31766 bdcaf612e75a
permissions -rw-r--r--
filemerge: tag merge tool for blocked times Merge tools can take a while - let's ensure that they're appropriately tagged
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     1
Criss cross merging
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     3
  $ hg init criss-cross
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     4
  $ cd criss-cross
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     5
  $ echo '0 base' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     6
  $ echo '0 base' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     7
  $ hg ci -Aqm '0 base'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     8
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     9
  $ echo '1 first change' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    10
  $ hg ci -m '1 first change f1'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    11
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    12
  $ hg up -qr0
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    13
  $ echo '2 first change' > f2
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    14
  $ mkdir d1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    15
  $ echo '0 base' > d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    16
  $ echo '0 base' > d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    17
  $ hg add -q d1
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    18
  $ hg ci -qm '2 first change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    19
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    20
  $ hg merge -qr 1
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    21
  $ hg rm d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    22
  $ hg mv -q d1 d2
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    23
  $ hg ci -m '3 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    24
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    25
  $ hg up -qr2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    26
  $ hg merge -qr1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    27
  $ hg ci -qm '4 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    28
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    29
  $ echo '5 second change' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    30
  $ hg ci -m '5 second change f1'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    31
21125
e94e90a4526e context: tell when .ancestor picks one of multiple common ancestors heads
Mads Kiilerich <madski@unity3d.com>
parents: 20636
diff changeset
    32
  $ hg up -r3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    33
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    34
  $ echo '6 second change' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    35
  $ hg ci -m '6 second change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    36
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    37
  $ hg log -G
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    38
  @  changeset:   6:6373bbfdae1d
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    39
  |  tag:         tip
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    40
  |  parent:      3:c202c8af058d
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    41
  |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    42
  |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    43
  |  summary:     6 second change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    44
  |
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    45
  | o  changeset:   5:e673248094b1
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    46
  | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    47
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    48
  | |  summary:     5 second change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    49
  | |
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    50
  | o    changeset:   4:177f58377c06
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    51
  | |\   parent:      2:d1d156401c1b
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    52
  | | |  parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    53
  | | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    54
  | | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    55
  | | |  summary:     4 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    56
  | | |
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    57
  o---+  changeset:   3:c202c8af058d
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    58
  | | |  parent:      2:d1d156401c1b
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    59
  |/ /   parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    60
  | |    user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    61
  | |    date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    62
  | |    summary:     3 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    63
  | |
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    64
  | o  changeset:   2:d1d156401c1b
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    65
  | |  parent:      0:40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    66
  | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    67
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    68
  | |  summary:     2 first change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    69
  | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    70
  o |  changeset:   1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    71
  |/   user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    72
  |    date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    73
  |    summary:     1 first change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    74
  |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    75
  o  changeset:   0:40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    76
     user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    77
     date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    78
     summary:     0 base
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    79
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    80
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
    81
  $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!'
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    82
  note: using 0f6b37dbe527 as ancestor of 6373bbfdae1d and e673248094b1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    83
        alternatively, use --config merge.preferancestor=d1d156401c1b
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    84
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    85
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    86
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    87
    unmatched files in other:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    88
     d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    89
     d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    90
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    91
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    92
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    93
     discovered dir src: 'd1/' -> dst: 'd2/'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    94
     pending file src: 'd1/f3' -> dst: 'd2/f3'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    95
     pending file src: 'd1/f4' -> dst: 'd2/f4'
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    96
  resolving manifests
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    97
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    98
   ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
    99
   preserving d2/f4 for resolve of d2/f4
21391
cb15835456cb merge: change debug logging - test output changes but no real changes
Mads Kiilerich <madski@unity3d.com>
parents: 21389
diff changeset
   100
   preserving f2 for resolve of f2
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   101
   f1: remote is newer -> g
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   102
  getting f1
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   103
   d2/f3: local directory rename - get from d1/f3 -> dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   104
  getting d1/f3 to d2/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   105
   d2/f4: local directory rename, both created -> m (premerge)
26618
8e6d5b7317e6 merge.mergestate: perform all premerges before any merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
   106
   f2: versions differ -> m (premerge)
27161
296d55def9c4 filemerge: add debug output for whether this is a change/delete conflict
Siddharth Agarwal <sid0@fb.com>
parents: 26618
diff changeset
   107
  picked tool ':dump' for f2 (binary False symlink False changedelete False)
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   108
  merging f2
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   109
  my f2@6373bbfdae1d+ other f2@e673248094b1 ancestor f2@0f6b37dbe527
26618
8e6d5b7317e6 merge.mergestate: perform all premerges before any merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
   110
   f2: versions differ -> m (merge)
27161
296d55def9c4 filemerge: add debug output for whether this is a change/delete conflict
Siddharth Agarwal <sid0@fb.com>
parents: 26618
diff changeset
   111
  picked tool ':dump' for f2 (binary False symlink False changedelete False)
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   112
  my f2@6373bbfdae1d+ other f2@e673248094b1 ancestor f2@0f6b37dbe527
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   113
  3 files updated, 0 files merged, 0 files removed, 1 files unresolved
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   114
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   115
  [1]
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   116
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   117
  $ f --dump --recurse *
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   118
  d2: directory with 2 files
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   119
  d2/f3:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   120
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   121
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   122
  <<<
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   123
  d2/f4:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   124
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   125
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   126
  <<<
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   127
  f1:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   128
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   129
  5 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   130
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   131
  f2:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   132
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   133
  6 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   134
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   135
  f2.base:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   136
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   137
  0 base
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   138
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   139
  f2.local:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   140
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   141
  6 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   142
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   143
  f2.orig:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   144
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   145
  6 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   146
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   147
  f2.other:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   148
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   149
  2 first change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   150
  <<<
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   151
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   152
  $ hg up -qC .
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   153
  $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d"
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   154
  note: using 0f6b37dbe527 as ancestor of 6373bbfdae1d and e673248094b1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   155
        alternatively, use --config merge.preferancestor=d1d156401c1b
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   156
  resolving manifests
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   157
  getting f1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   158
  getting d1/f3 to d2/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   159
  merging f2
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   160
  3 files updated, 0 files merged, 0 files removed, 1 files unresolved
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   161
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   162
  [1]
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   163
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   164
Redo merge with merge.preferancestor="*" to enable bid merge
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   165
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   166
  $ rm f*
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   167
  $ hg up -qC .
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   168
  $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*"
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   169
  note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   170
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   171
  calculating bids for ancestor 0f6b37dbe527
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   172
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   173
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   174
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   175
    unmatched files in other:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   176
     d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   177
     d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   178
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   179
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   180
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   181
     discovered dir src: 'd1/' -> dst: 'd2/'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   182
     pending file src: 'd1/f3' -> dst: 'd2/f3'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   183
     pending file src: 'd1/f4' -> dst: 'd2/f4'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   184
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   185
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   186
   ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   187
   d2/f3: local directory rename - get from d1/f3 -> dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   188
   d2/f4: local directory rename, both created -> m
21269
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   189
   f1: remote is newer -> g
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   190
   f2: versions differ -> m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   191
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   192
  calculating bids for ancestor d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   193
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   194
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   195
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   196
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   197
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   198
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   199
     discovered dir src: 'd1/' -> dst: 'd2/'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   200
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   201
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   202
   ancestor: d1d156401c1b, local: 6373bbfdae1d+, remote: e673248094b1
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   203
   f1: versions differ -> m
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   204
   f2: remote unchanged -> k
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   205
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   206
  auction for merging merge bids
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   207
   d2/f3: consensus for dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   208
   d2/f4: consensus for m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   209
   f1: picking 'get' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   210
   f2: picking 'keep' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   211
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   212
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   213
   preserving d2/f4 for resolve of d2/f4
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   214
   f1: remote is newer -> g
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   215
  getting f1
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   216
   f2: remote unchanged -> k
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   217
   d2/f3: local directory rename - get from d1/f3 -> dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   218
  getting d1/f3 to d2/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   219
   d2/f4: local directory rename, both created -> m (premerge)
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   220
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   221
  (branch merge, don't forget to commit)
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   222
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   223
  $ f --dump --recurse *
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   224
  d2: directory with 2 files
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   225
  d2/f3:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   226
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   227
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   228
  <<<
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   229
  d2/f4:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   230
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   231
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   232
  <<<
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   233
  f1:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   234
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   235
  5 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   236
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   237
  f2:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   238
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   239
  6 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   240
  <<<
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   241
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   242
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   243
The other way around:
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   244
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   245
  $ hg up -C -r5
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   246
  4 files updated, 0 files merged, 1 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   247
  $ hg merge -v --debug --config merge.preferancestor="*"
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   248
  note: merging e673248094b1+ and 6373bbfdae1d using bids from ancestors 0f6b37dbe527 and d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   249
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   250
  calculating bids for ancestor 0f6b37dbe527
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   251
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   252
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   253
     d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   254
     d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   255
    unmatched files in other:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   256
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   257
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   258
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   259
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   260
     discovered dir src: 'd1/' -> dst: 'd2/'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   261
     pending file src: 'd1/f3' -> dst: 'd2/f3'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   262
     pending file src: 'd1/f4' -> dst: 'd2/f4'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   263
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   264
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   265
   ancestor: 0f6b37dbe527, local: e673248094b1+, remote: 6373bbfdae1d
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   266
   d2/f3: remote directory rename - move from d1/f3 -> dm
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   267
   d2/f4: remote directory rename, both created -> m
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   268
   f1: remote unchanged -> k
21269
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   269
   f2: versions differ -> m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   270
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   271
  calculating bids for ancestor d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   272
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   273
    unmatched files in other:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   274
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   275
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   276
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   277
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   278
     discovered dir src: 'd1/' -> dst: 'd2/'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   279
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   280
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   281
   ancestor: d1d156401c1b, local: e673248094b1+, remote: 6373bbfdae1d
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   282
   d1/f3: other deleted -> r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   283
   d1/f4: other deleted -> r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   284
   d2/f4: remote created -> g
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   285
   f1: versions differ -> m
21391
cb15835456cb merge: change debug logging - test output changes but no real changes
Mads Kiilerich <madski@unity3d.com>
parents: 21389
diff changeset
   286
   f2: remote is newer -> g
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   287
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   288
  auction for merging merge bids
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   289
   d1/f3: consensus for r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   290
   d1/f4: consensus for r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   291
   d2/f3: consensus for dm
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   292
   d2/f4: picking 'get' action
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   293
   f1: picking 'keep' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   294
   f2: picking 'get' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   295
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   296
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   297
   d1/f3: other deleted -> r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   298
  removing d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   299
   d1/f4: other deleted -> r
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   300
  removing d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   301
   d2/f4: remote created -> g
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   302
  getting d2/f4
21389
e741972017d9 merge: change priority / ordering of merge actions
Mads Kiilerich <madski@unity3d.com>
parents: 21269
diff changeset
   303
   f2: remote is newer -> g
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   304
  getting f2
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   305
   f1: remote unchanged -> k
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   306
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   307
  (branch merge, don't forget to commit)
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   308
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   309
  $ f --dump --recurse *
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   310
  d2: directory with 2 files
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   311
  d2/f3:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   312
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   313
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   314
  <<<
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   315
  d2/f4:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   316
  >>>
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   317
  0 base
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   318
  <<<
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   319
  f1:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   320
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   321
  5 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   322
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   323
  f2:
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   324
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   325
  6 second change
30855
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   326
  <<<
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   327
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   328
Verify how the output looks and and how verbose it is:
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   329
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   330
  $ hg up -qC
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   331
  $ hg merge
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   332
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   333
  (branch merge, don't forget to commit)
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   334
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   335
  $ hg up -qC tip
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   336
  $ hg merge -v
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   337
  note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   338
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   339
  calculating bids for ancestor 0f6b37dbe527
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   340
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   341
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   342
  calculating bids for ancestor d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   343
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   344
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   345
  auction for merging merge bids
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   346
   d2/f3: consensus for dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   347
   d2/f4: consensus for m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   348
   f1: picking 'get' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   349
   f2: picking 'keep' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   350
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   351
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   352
  getting f1
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   353
  getting d1/f3 to d2/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   354
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   355
  (branch merge, don't forget to commit)
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   356
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   357
  $ hg up -qC
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   358
  $ hg merge -v --debug --config merge.preferancestor="*"
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   359
  note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   360
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   361
  calculating bids for ancestor 0f6b37dbe527
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   362
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   363
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   364
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   365
    unmatched files in other:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   366
     d1/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   367
     d1/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   368
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   369
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   370
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   371
     discovered dir src: 'd1/' -> dst: 'd2/'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   372
     pending file src: 'd1/f3' -> dst: 'd2/f3'
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   373
     pending file src: 'd1/f4' -> dst: 'd2/f4'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   374
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   375
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   376
   ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   377
   d2/f3: local directory rename - get from d1/f3 -> dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   378
   d2/f4: local directory rename, both created -> m
21269
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   379
   f1: remote is newer -> g
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   380
   f2: versions differ -> m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   381
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   382
  calculating bids for ancestor d1d156401c1b
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   383
    searching for copies back to rev 3
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   384
    unmatched files in local:
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   385
     d2/f4
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   386
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   387
     src: 'd1/f4' -> dst: 'd2/f4' 
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   388
    checking for directory renames
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   389
     discovered dir src: 'd1/' -> dst: 'd2/'
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   390
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   391
   branchmerge: True, force: False, partial: False
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   392
   ancestor: d1d156401c1b, local: 6373bbfdae1d+, remote: e673248094b1
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   393
   f1: versions differ -> m
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   394
   f2: remote unchanged -> k
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   395
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   396
  auction for merging merge bids
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   397
   d2/f3: consensus for dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   398
   d2/f4: consensus for m
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   399
   f1: picking 'get' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   400
   f2: picking 'keep' action
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   401
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   402
  
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   403
   preserving d2/f4 for resolve of d2/f4
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   404
   f1: remote is newer -> g
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   405
  getting f1
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   406
   f2: remote unchanged -> k
30856
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   407
   d2/f3: local directory rename - get from d1/f3 -> dg
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   408
  getting d1/f3 to d2/f3
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   409
   d2/f4: local directory rename, both created -> m (premerge)
41f6af50c0d8 merge: fix crash on criss cross merge with dir move and delete (issue5020)
Mads Kiilerich <mads@kiilerich.com>
parents: 30855
diff changeset
   410
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   411
  (branch merge, don't forget to commit)
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   412
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   413
  $ cd ..
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   414
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   415
http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   416
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   417
  $ hg init ancestor-merging
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   418
  $ cd ancestor-merging
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   419
  $ echo a > x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   420
  $ hg commit -A -m a x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   421
  $ hg update -q 0
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   422
  $ echo b >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   423
  $ hg commit -m b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   424
  $ hg update -q 0
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   425
  $ echo c >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   426
  $ hg commit -qm c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   427
  $ hg update -q 1
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   428
  $ hg merge -q --tool internal:local 2
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   429
  $ echo c >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   430
  $ hg commit -m bc
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   431
  $ hg update -q 2
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   432
  $ hg merge -q --tool internal:local 1
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   433
  $ echo b >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   434
  $ hg commit -qm cb
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   435
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   436
  $ hg merge --config merge.preferancestor='!'
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   437
  note: using 70008a2163f6 as ancestor of 0d355fdef312 and 4b8b546a3eef
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   438
        alternatively, use --config merge.preferancestor=b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   439
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   440
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   441
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   442
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   443
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   444
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   445
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   446
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   447
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   448
  $ hg up -qC .
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   449
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   450
  $ hg merge --config merge.preferancestor=b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   451
  note: using b211bbc6eb3c as ancestor of 0d355fdef312 and 4b8b546a3eef
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   452
        alternatively, use --config merge.preferancestor=70008a2163f6
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   453
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   454
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   455
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   456
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   457
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   458
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   459
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   460
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   461
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   462
  $ hg up -qC .
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   463
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   464
  $ hg merge -v --config merge.preferancestor="*"
21171
33737ebc6f39 merge: tell the user when we are using bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21170
diff changeset
   465
  note: merging 0d355fdef312+ and 4b8b546a3eef using bids from ancestors 70008a2163f6 and b211bbc6eb3c
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   466
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   467
  calculating bids for ancestor 70008a2163f6
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   468
  resolving manifests
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   469
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   470
  calculating bids for ancestor b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   471
  resolving manifests
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   472
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   473
  auction for merging merge bids
21172
0f0059af920c merge: improve notes for listing the bids for ambiguous merges
Mads Kiilerich <madski@unity3d.com>
parents: 21171
diff changeset
   474
   x: multiple bids for merge action:
0f0059af920c merge: improve notes for listing the bids for ambiguous merges
Mads Kiilerich <madski@unity3d.com>
parents: 21171
diff changeset
   475
    versions differ -> m
0f0059af920c merge: improve notes for listing the bids for ambiguous merges
Mads Kiilerich <madski@unity3d.com>
parents: 21171
diff changeset
   476
    versions differ -> m
21170
ea3972243320 merge: fix stray character in bid merge message
Mads Kiilerich <madski@unity3d.com>
parents: 21169
diff changeset
   477
   x: ambiguous merge - picked m action
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   478
  end of auction
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   479
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   480
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   481
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   482
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   483
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   484
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   485
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   486
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   487
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   488
22180
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   489
Verify that the old context ancestor works with / despite preferancestor:
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   490
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   491
  $ hg log -r 'ancestor(head())' --config merge.preferancestor=1 -T '{rev}\n'
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   492
  1
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   493
  $ hg log -r 'ancestor(head())' --config merge.preferancestor=2 -T '{rev}\n'
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   494
  2
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   495
  $ hg log -r 'ancestor(head())' --config merge.preferancestor=3 -T '{rev}\n'
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   496
  1
22671
5220c12c43fd changectx: skip all invalid merge.preferancestor values
Mads Kiilerich <madski@unity3d.com>
parents: 22180
diff changeset
   497
  $ hg log -r 'ancestor(head())' --config merge.preferancestor='1337 * - 2' -T '{rev}\n'
5220c12c43fd changectx: skip all invalid merge.preferancestor values
Mads Kiilerich <madski@unity3d.com>
parents: 22180
diff changeset
   498
  2
22180
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   499
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   500
  $ cd ..