tests/test-merge-criss-cross.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 19 Jun 2020 13:27:46 +0200
changeset 45465 9bd60ec60601
parent 45459 ccd3bf4490c1
child 45468 09edbff6ae8d
permissions -rw-r--r--
tests: add criss cross merging tests whose behavior need to be fixed Merging two changesets can mark a file as removed post merge. However, in some cases, a user might not want to remove that file and they revert the removal back and commit the merge. All this works perfectly well. However, when we do criss-cross merges with such merge where user explicitly choose to revert the removal with one where another user choose the removal, we does not get any conflict. The intent here is conflicting and merge should result in conflicts. One user merged and want to keep the file while other user merged and want to remove the file. Merging those merges should result in conflicts. This patch adds test cases for these cases. Differential Revision: https://phab.mercurial-scm.org/D8939
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
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    14
  $ hg ci -qm '2 first change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    15
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    16
  $ hg merge -qr 1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    17
  $ hg ci -m '3 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    18
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    19
  $ hg up -qr2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    20
  $ hg merge -qr1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    21
  $ hg ci -qm '4 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    22
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    23
  $ echo '5 second change' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    24
  $ hg ci -m '5 second change f1'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    25
21125
e94e90a4526e context: tell when .ancestor picks one of multiple common ancestors heads
Mads Kiilerich <madski@unity3d.com>
parents: 20636
diff changeset
    26
  $ hg up -r3
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    27
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    28
  $ echo '6 second change' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    29
  $ hg ci -m '6 second change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    30
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    31
  $ hg log -G
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    32
  @  changeset:   6:3b08d01b0ab5
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    33
  |  tag:         tip
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    34
  |  parent:      3:cf89f02107e5
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    35
  |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    36
  |  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
    37
  |  summary:     6 second change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    38
  |
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    39
  | o  changeset:   5:adfe50279922
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    40
  | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    41
  | |  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
    42
  | |  summary:     5 second change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    43
  | |
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    44
  | o    changeset:   4:7d3e55501ae6
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    45
  | |\   parent:      2:40663881a6dd
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    46
  | | |  parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    47
  | | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    48
  | | |  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
    49
  | | |  summary:     4 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    50
  | | |
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    51
  o---+  changeset:   3:cf89f02107e5
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    52
  | | |  parent:      2:40663881a6dd
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    53
  |/ /   parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    54
  | |    user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    55
  | |    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
    56
  | |    summary:     3 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    57
  | |
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    58
  | o  changeset:   2:40663881a6dd
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    59
  | |  parent:      0:40494bf2444c
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:     2 first change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    63
  | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    64
  o |  changeset:   1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    65
  |/   user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    66
  |    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
    67
  |    summary:     1 first change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    68
  |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    69
  o  changeset:   0:40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    70
     user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    71
     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
    72
     summary:     0 base
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    73
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    74
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
    75
  $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!'
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    76
  note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    77
        alternatively, use --config merge.preferancestor=40663881a6dd
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    78
  resolving manifests
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    79
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    80
   ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
21391
cb15835456cb merge: change debug logging - test output changes but no real changes
Mads Kiilerich <madski@unity3d.com>
parents: 21389
diff changeset
    81
   preserving f2 for resolve of f2
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    82
   f1: remote is newer -> g
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    83
  getting f1
26618
8e6d5b7317e6 merge.mergestate: perform all premerges before any merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
    84
   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
    85
  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
    86
  merging f2
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    87
  my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
26618
8e6d5b7317e6 merge.mergestate: perform all premerges before any merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
    88
   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
    89
  picked tool ':dump' for f2 (binary False symlink False changedelete False)
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    90
  my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    91
  1 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35393
diff changeset
    92
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    93
  [1]
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    94
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
    95
  $ f --dump *
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
    96
  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
    97
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    98
  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
    99
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   100
  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
   101
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   102
  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
   103
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   104
  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
   105
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   106
  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
   107
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   108
  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
   109
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   110
  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
   111
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   112
  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
   113
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   114
  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
   115
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   116
  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
   117
  >>>
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   118
  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
   119
  <<<
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   120
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   121
  $ hg up -qC .
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   122
  $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d"
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   123
  note: using 40663881a6dd as ancestor of 3b08d01b0ab5 and adfe50279922
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   124
        alternatively, use --config merge.preferancestor=0f6b37dbe527
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   125
  resolving manifests
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   126
  merging f1
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   127
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35393
diff changeset
   128
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
21126
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   129
  [1]
99b5eaf372a7 context: introduce merge.preferancestor for controlling which ancestor to pick
Mads Kiilerich <madski@unity3d.com>
parents: 21125
diff changeset
   130
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   131
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
   132
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   133
  $ rm f*
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   134
  $ hg up -qC .
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   135
  $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*"
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   136
  note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   137
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   138
  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
   139
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   140
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   141
   ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
21269
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   142
   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
   143
   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
   144
  
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   145
  calculating bids for ancestor 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   146
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   147
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   148
   ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   149
   f1: versions differ -> m
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   150
   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
   151
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   152
  auction for merging merge bids (2 ancestors)
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   153
   list of bids for f1:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   154
     remote is newer -> g
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   155
     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
   156
   f1: picking 'get' action
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   157
   list of bids for f2:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   158
     remote unchanged -> k
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   159
     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
   160
   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
   161
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   162
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   163
   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
   164
  getting f1
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   165
   f2: remote unchanged -> k
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   166
  1 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
   167
  (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
   168
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   169
  $ f --dump *
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
   170
  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
   171
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   172
  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
   173
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   174
  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
   175
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   176
  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
   177
  <<<
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   178
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   179
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   180
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
   181
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   182
  $ hg up -C -r5
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   183
  2 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
   184
  $ hg merge -v --debug --config merge.preferancestor="*"
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   185
  note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   186
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   187
  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
   188
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   189
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   190
   ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   191
   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
   192
   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
   193
  
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   194
  calculating bids for ancestor 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   195
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   196
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   197
   ancestor: 40663881a6dd, local: adfe50279922+, remote: 3b08d01b0ab5
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   198
   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
   199
   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
   200
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   201
  auction for merging merge bids (2 ancestors)
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   202
   list of bids for f1:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   203
     remote unchanged -> k
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   204
     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
   205
   f1: picking 'keep' action
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   206
   list of bids for f2:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   207
     remote is newer -> g
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   208
     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
   209
   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
   210
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   211
  
21389
e741972017d9 merge: change priority / ordering of merge actions
Mads Kiilerich <madski@unity3d.com>
parents: 21269
diff changeset
   212
   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
   213
  getting f2
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   214
   f1: remote unchanged -> k
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   215
  1 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
   216
  (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
   217
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   218
  $ f --dump *
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
   219
  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
   220
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   221
  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
   222
  <<<
72c36a2be2d6 tests: use 'f' in test-merge-criss-cross.t to prepare for recursive dumping
Mads Kiilerich <mads@kiilerich.com>
parents: 28065
diff changeset
   223
  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
   224
  >>>
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   225
  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
   226
  <<<
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   227
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   228
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
   229
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   230
  $ hg up -qC
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   231
  $ hg merge
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   232
  1 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
   233
  (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
   234
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   235
  $ hg up -qC tip
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   236
  $ hg merge -v
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   237
  note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   238
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   239
  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
   240
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   241
  
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   242
  calculating bids for ancestor 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   243
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   244
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   245
  auction for merging merge bids (2 ancestors)
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   246
   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
   247
   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
   248
  end of auction
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
  getting f1
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   251
  1 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
   252
  (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
   253
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   254
  $ hg up -qC
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   255
  $ hg merge -v --debug --config merge.preferancestor="*"
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   256
  note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   257
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   258
  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
   259
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   260
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   261
   ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
21269
fa601c4e03f9 merge: make debug output slightly more helpful by including message for action
Mads Kiilerich <madski@unity3d.com>
parents: 21172
diff changeset
   262
   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
   263
   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
   264
  
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   265
  calculating bids for ancestor 40663881a6dd
21128
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   266
  resolving manifests
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   267
   branchmerge: True, force: False, partial: False
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   268
   ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
23638
09be050ca98c merge: let bid merge work on the file->action dict
Martin von Zweigbergk <martinvonz@google.com>
parents: 23482
diff changeset
   269
   f1: versions differ -> m
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   270
   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
   271
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   272
  auction for merging merge bids (2 ancestors)
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   273
   list of bids for f1:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   274
     remote is newer -> g
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   275
     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
   276
   f1: picking 'get' action
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   277
   list of bids for f2:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   278
     remote unchanged -> k
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   279
     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
   280
   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
   281
  end of auction
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   282
  
f4014f646f71 merge: with merge.preferancestor=*, run an auction with bids from ancestors
Mads Kiilerich <madski@unity3d.com>
parents: 21126
diff changeset
   283
   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
   284
  getting f1
23482
208ec8ca7c79 merge: make 'keep' message more descriptive
Martin von Zweigbergk <martinvonz@google.com>
parents: 22673
diff changeset
   285
   f2: remote unchanged -> k
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   286
  1 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
   287
  (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
   288
38625
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   289
Test the greatest common ancestor returning multiple changesets
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   290
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   291
  $ hg log -r 'heads(commonancestors(head()))'
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   292
  changeset:   1:0f6b37dbe527
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   293
  user:        test
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   294
  date:        Thu Jan 01 00:00:00 1970 +0000
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   295
  summary:     1 first change f1
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   296
  
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   297
  changeset:   2:40663881a6dd
38625
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   298
  parent:      0:40494bf2444c
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   299
  user:        test
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   300
  date:        Thu Jan 01 00:00:00 1970 +0000
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   301
  summary:     2 first change f2
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   302
  
52f19a840543 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io>
parents: 35704
diff changeset
   303
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   304
  $ cd ..
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   305
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   306
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
   307
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   308
  $ hg init ancestor-merging
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   309
  $ cd ancestor-merging
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   310
  $ echo a > x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   311
  $ hg commit -A -m a x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   312
  $ hg update -q 0
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   313
  $ echo b >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   314
  $ hg commit -m b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   315
  $ hg update -q 0
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   316
  $ echo c >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   317
  $ hg commit -qm c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   318
  $ hg update -q 1
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   319
  $ hg merge -q --tool internal:local 2
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   320
  $ echo c >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   321
  $ hg commit -m bc
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   322
  $ hg update -q 2
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   323
  $ hg merge -q --tool internal:local 1
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   324
  $ echo b >> x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   325
  $ hg commit -qm cb
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   326
22672
19903277f035 merge: use bid merge by default (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22671
diff changeset
   327
  $ hg merge --config merge.preferancestor='!'
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   328
  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
   329
        alternatively, use --config merge.preferancestor=b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   330
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   331
  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
   332
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   333
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   334
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   335
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   336
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   337
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   338
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   339
  $ hg up -qC .
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   340
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   341
  $ hg merge --config merge.preferancestor=b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   342
  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
   343
        alternatively, use --config merge.preferancestor=70008a2163f6
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   344
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   345
  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
   346
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   347
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   348
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   349
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   350
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   351
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   352
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   353
  $ hg up -qC .
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   354
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   355
  $ 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
   356
  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
   357
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   358
  calculating bids for ancestor 70008a2163f6
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   359
  resolving manifests
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   360
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   361
  calculating bids for ancestor b211bbc6eb3c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   362
  resolving manifests
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   363
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   364
  auction for merging merge bids (2 ancestors)
21172
0f0059af920c merge: improve notes for listing the bids for ambiguous merges
Mads Kiilerich <madski@unity3d.com>
parents: 21171
diff changeset
   365
   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
   366
    versions differ -> m
0f0059af920c merge: improve notes for listing the bids for ambiguous merges
Mads Kiilerich <madski@unity3d.com>
parents: 21171
diff changeset
   367
    versions differ -> m
21170
ea3972243320 merge: fix stray character in bid merge message
Mads Kiilerich <madski@unity3d.com>
parents: 21169
diff changeset
   368
   x: ambiguous merge - picked m action
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   369
  end of auction
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   370
  
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   371
  merging x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   372
  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
   373
  (branch merge, don't forget to commit)
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   374
  $ cat x
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   375
  a
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   376
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   377
  b
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   378
  c
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   379
22180
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   380
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
   381
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   382
  $ 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
   383
  1
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   384
  $ 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
   385
  2
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   386
  $ 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
   387
  1
22671
5220c12c43fd changectx: skip all invalid merge.preferancestor values
Mads Kiilerich <madski@unity3d.com>
parents: 22180
diff changeset
   388
  $ 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
   389
  2
22180
17011b36aac7 changectx: ancestor should only prefer merge.preferancestor if it is a revision
Mads Kiilerich <madski@unity3d.com>
parents: 22179
diff changeset
   390
21169
b743077db69a tests: better test coverage for bid merge
Mads Kiilerich <madski@unity3d.com>
parents: 21128
diff changeset
   391
  $ cd ..
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   392
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   393
  $ hg init issue5020
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   394
  $ cd issue5020
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   395
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   396
  $ echo a > noop
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   397
  $ hg ci -qAm initial
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   398
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   399
  $ echo b > noop
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   400
  $ hg ci -qAm 'uninteresting change'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   401
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   402
  $ hg up -q 0
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   403
  $ mkdir d1
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   404
  $ echo a > d1/a
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   405
  $ echo b > d1/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   406
  $ hg ci -qAm 'add d1/a and d1/b'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   407
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   408
  $ hg merge -q 1
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   409
  $ hg rm d1/a
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   410
  $ hg mv -q d1 d2
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   411
  $ hg ci -qm 'merge while removing d1/a and moving d1/b to d2/b'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   412
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   413
  $ hg up -q 1
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   414
  $ hg merge -q 2
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   415
  $ hg ci -qm 'merge (no changes while merging)'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   416
  $ hg log -G -T '{rev}:{node|short} {desc}'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   417
  @    4:c0ef19750a22 merge (no changes while merging)
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   418
  |\
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   419
  +---o  3:6ca01f7342b9 merge while removing d1/a and moving d1/b to d2/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   420
  | |/
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   421
  | o  2:154e6000f54e add d1/a and d1/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   422
  | |
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   423
  o |  1:11b5b303e36c uninteresting change
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   424
  |/
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   425
  o  0:7b54db1ebf33 initial
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   426
  
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   427
  $ hg merge 3 --debug
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   428
  note: merging c0ef19750a22+ and 6ca01f7342b9 using bids from ancestors 11b5b303e36c and 154e6000f54e
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   429
  
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   430
  calculating bids for ancestor 11b5b303e36c
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   431
  resolving manifests
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   432
   branchmerge: True, force: False, partial: False
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   433
   ancestor: 11b5b303e36c, local: c0ef19750a22+, remote: 6ca01f7342b9
42162
31abb9d713af copies: don't include copies that are not in source in directory move
Martin von Zweigbergk <martinvonz@google.com>
parents: 42154
diff changeset
   434
   d2/b: remote created -> g
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   435
  
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   436
  calculating bids for ancestor 154e6000f54e
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   437
    unmatched files in other:
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   438
     d2/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   439
    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
44197
17e12938f8e7 copies: print debug information about copies per side/branch
Martin von Zweigbergk <martinvonz@google.com>
parents: 44162
diff changeset
   440
     on remote side:
17e12938f8e7 copies: print debug information about copies per side/branch
Martin von Zweigbergk <martinvonz@google.com>
parents: 44162
diff changeset
   441
      src: 'd1/b' -> dst: 'd2/b' 
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   442
    checking for directory renames
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   443
     discovered dir src: 'd1/' -> dst: 'd2/'
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   444
  resolving manifests
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   445
   branchmerge: True, force: False, partial: False
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   446
   ancestor: 154e6000f54e, local: c0ef19750a22+, remote: 6ca01f7342b9
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   447
   d1/a: other deleted -> r
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   448
   d1/b: other deleted -> r
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   449
   d2/b: remote created -> g
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   450
  
45447
e7c8a5030a90 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44197
diff changeset
   451
  auction for merging merge bids (2 ancestors)
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   452
   list of bids for d1/a:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   453
     other deleted -> r
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   454
   d1/a: consensus for r
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   455
   list of bids for d1/b:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   456
     other deleted -> r
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   457
   d1/b: consensus for r
45459
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   458
   list of bids for d2/b:
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   459
     remote created -> g
ccd3bf4490c1 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45447
diff changeset
   460
     remote created -> g
42162
31abb9d713af copies: don't include copies that are not in source in directory move
Martin von Zweigbergk <martinvonz@google.com>
parents: 42154
diff changeset
   461
   d2/b: consensus for g
42154
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   462
  end of auction
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   463
  
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   464
   d1/a: other deleted -> r
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   465
  removing d1/a
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   466
   d1/b: other deleted -> r
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   467
  removing d1/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   468
   d2/b: remote created -> g
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   469
  getting d2/b
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   470
  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
f2fe7cf4ebb6 tests: split out separate test for issue5020
Martin von Zweigbergk <martinvonz@google.com>
parents: 38625
diff changeset
   471
  (branch merge, don't forget to commit)
45465
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   472
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   473
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   474
Check that removal reversion does not go unotified
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   475
==================================================
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   476
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   477
On a merge, a file can be removed and user can revert that removal. This means
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   478
user has made an explicit choice of keeping the file or reverting the removal
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   479
even though the merge algo wanted to remove it.
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   480
Based on this, when we do criss cross merges, merge algorithm should not again
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   481
choose to remove the file as in one of the merges, user made an explicit choice
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   482
to revert the removal.
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   483
Following test cases demonstrate how merge algo does not take in account
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   484
explicit choices made by users to revert the removal and on criss-cross merging
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   485
removes the file again.
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   486
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   487
"Simple" case where the filenode changes
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   488
----------------------------------------
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   489
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   490
  $ cd ..
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   491
  $ hg init criss-cross-merge-reversal-with-update
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   492
  $ cd criss-cross-merge-reversal-with-update
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   493
  $ echo the-file > the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   494
  $ echo other-file > other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   495
  $ hg add the-file other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   496
  $ hg ci -m 'root-commit'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   497
  $ echo foo >> the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   498
  $ echo bar >> other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   499
  $ hg ci -m 'updating-both-file'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   500
  $ hg up 'desc("root-commit")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   501
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   502
  $ hg rm the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   503
  $ hg ci -m 'delete-the-file'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   504
  created new head
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   505
  $ hg log -G -T '{node|short} {desc}\n'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   506
  @  7801bc9b9899 delete-the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   507
  |
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   508
  | o  9b610631ab29 updating-both-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   509
  |/
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   510
  o  955800955977 root-commit
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   511
  
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   512
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   513
Do all the merge combination (from the deleted or the update side × keeping and deleting the file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   514
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   515
  $ hg update 'desc("delete-the-file")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   516
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   517
  $ hg merge 'desc("updating-both-file")' -t :local
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   518
  1 files updated, 1 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   519
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   520
  $ hg ci -m "merge-deleting-the-file-from-deleted"
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   521
  $ hg manifest
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   522
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   523
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   524
  $ hg update 'desc("updating-both-file")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   525
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   526
  $ hg merge 'desc("delete-the-file")' -t :other
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   527
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   528
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   529
  $ hg ci -m "merge-deleting-the-file-from-updated"
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   530
  created new head
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   531
  $ hg manifest
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   532
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   533
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   534
  $ hg update 'desc("delete-the-file")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   535
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   536
  $ hg merge 'desc("updating-both-file")' -t :other
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   537
  1 files updated, 1 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   538
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   539
  $ hg ci -m "merge-keeping-the-file-from-deleted"
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   540
  created new head
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   541
  $ hg manifest
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   542
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   543
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   544
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   545
  $ hg update 'desc("updating-both-file")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   546
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   547
  $ hg merge 'desc("delete-the-file")' -t :local
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   548
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   549
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   550
  $ hg ci -m "merge-keeping-the-file-from-updated"
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   551
  created new head
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   552
  $ hg manifest
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   553
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   554
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   555
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   556
There the resulting merge together (leading to criss cross situation). Check
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   557
the conflict is properly detected.
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   558
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   559
(merging two deletion together → no conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   560
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   561
  $ hg update --clean 'desc("merge-deleting-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   562
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   563
  $ hg merge          'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   564
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   565
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   566
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   567
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   568
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   569
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   570
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   571
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   572
  $ hg update --clean 'desc("merge-deleting-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   573
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   574
  $ hg merge          'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   575
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   576
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   577
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   578
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   579
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   580
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   581
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   582
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   583
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   584
  $ hg update --clean 'desc("merge-deleting-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   585
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   586
  $ hg merge          'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   587
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   588
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   589
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   590
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   591
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   592
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   593
(merging two deletion together → no conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   594
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   595
  $ hg update --clean 'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   596
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   597
  $ hg merge          'desc("merge-deleting-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   598
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   599
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   600
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   601
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   602
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   603
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   604
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   605
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   606
  $ hg update --clean 'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   607
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   608
  $ hg merge          'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   609
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   610
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   611
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   612
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   613
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   614
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   615
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   616
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   617
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   618
  $ hg update --clean 'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   619
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   620
  $ hg merge          'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   621
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   622
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   623
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   624
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   625
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   626
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   627
(merging two "keeping" together → no conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   628
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   629
  $ hg update --clean 'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   630
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   631
  $ hg merge          'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   632
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   633
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   634
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   635
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   636
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   637
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   638
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   639
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   640
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   641
  $ hg update --clean 'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   642
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   643
  $ hg merge          'desc("merge-deleted-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   644
  abort: empty revision set
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   645
  [255]
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   646
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   647
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   648
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   649
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   650
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   651
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   652
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   653
  $ hg update --clean 'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   654
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   655
  $ hg merge          'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   656
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   657
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   658
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   659
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   660
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   661
(merging two "keeping" together → no conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   662
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   663
  $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   664
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   665
  $ hg merge          'desc("merge-keeping-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   666
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   667
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   668
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   669
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   670
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   671
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   672
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   673
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   674
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   675
  $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   676
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   677
  $ hg merge          'desc("merge-deleted-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   678
  abort: empty revision set
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   679
  [255]
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   680
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   681
  other-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   682
  the-file
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   683
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   684
(merging a deletion with keeping → conflict)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   685
BROKEN: this should result in conflict
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   686
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   687
  $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   688
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   689
  $ hg merge          'desc("merge-deleting-the-file-from-updated")'
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   690
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   691
  (branch merge, don't forget to commit)
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   692
  $ ls -1
9bd60ec60601 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45459
diff changeset
   693
  other-file