tests/test-merge-changedelete.t
author Siddharth Agarwal <sid0@fb.com>
Wed, 25 Nov 2015 14:25:33 -0800
changeset 27137 25e4b2f000c5
parent 27136 29b08ca680b0
child 27162 4ab69be0ea15
permissions -rw-r--r--
merge: move almost all change/delete conflicts to resolve phase (BC) (API) We have finally laid all the groundwork to make this happen. The only change/delete conflicts that haven't been moved are .hgsubstate conflicts. Those are trickier to deal with and well outside the scope of this series. We add comprehensive testing not just for the initial selections but also for re-resolves and all possible dirstate transitions caused by merge tools. That testing managed to shake out several bugs in the way we were handling dirstate transitions. The other test changes are because we now treat change/delete conflicts as proper merges, and increment the 'merged' counter rather than the 'updated' counter. I believe this is the right approach here. For third-party extensions, if they're interacting with filemerge code they might have to deal with an absentfilectx rather than a regular filectx. Still to come: - add a 'leave unresolved' option to merges - change the default for non-interactive change/delete conflicts to be 'leave unresolved' - add debug output to go alongside debug outputs for binary and symlink file merges
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
     1
Tests for change/delete conflicts, including:
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12259
diff changeset
     2
b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12259
diff changeset
     3
 (issue897)
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12259
diff changeset
     4
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12259
diff changeset
     5
840e2b315c1f: Fix misleading error and prompts during update/merge
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12259
diff changeset
     6
 (issue556)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
     7
26895
fc41f9ffd4a4 test-merge-prompt.t: unset HGMERGE
Siddharth Agarwal <sid0@fb.com>
parents: 26850
diff changeset
     8
Make sure HGMERGE doesn't interfere with the test
fc41f9ffd4a4 test-merge-prompt.t: unset HGMERGE
Siddharth Agarwal <sid0@fb.com>
parents: 26850
diff changeset
     9
  $ unset HGMERGE
fc41f9ffd4a4 test-merge-prompt.t: unset HGMERGE
Siddharth Agarwal <sid0@fb.com>
parents: 26850
diff changeset
    10
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    11
  $ status() {
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    12
  >     echo "--- status ---"
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    13
  >     hg st -A file1 file2 file3
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
    14
  >     echo "--- resolve --list ---"
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
    15
  >     hg resolve --list file1 file2 file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    16
  >     echo "--- debugmergestate ---"
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    17
  >     hg debugmergestate
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    18
  >     for file in file1 file2 file3; do
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    19
  >         if [ -f $file ]; then
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    20
  >             echo "--- $file ---"
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    21
  >             cat $file
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    22
  >         else
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    23
  >             echo "*** $file does not exist"
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    24
  >         fi
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    25
  >     done
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    26
  > }
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    27
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    28
  $ hg init repo
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    29
  $ cd repo
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    30
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    31
  $ echo 1 > file1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    32
  $ echo 2 > file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    33
  $ echo 3 > file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    34
  $ hg ci -Am 'added files'
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    35
  adding file1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    36
  adding file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    37
  adding file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    38
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    39
  $ hg rm file1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    40
  $ echo changed >> file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    41
  $ echo changed1 >> file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    42
  $ hg ci -m 'removed file1, changed file2, changed file3'
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    43
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    44
  $ hg co 0
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    45
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    46
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    47
  $ echo changed >> file1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    48
  $ hg rm file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    49
  $ echo changed2 >> file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    50
  $ hg ci -m 'changed file1, removed file2, changed file3'
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    51
  created new head
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    52
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    53
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    54
Non-interactive merge:
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    55
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
    56
  $ hg merge -y
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
    57
  local changed file1 which remote deleted
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    58
  use (c)hanged version or (d)elete? c
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    59
  remote changed file2 which local deleted
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    60
  use (c)hanged version or leave (d)eleted? c
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    61
  merging file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    62
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    63
  0 files updated, 2 files merged, 0 files removed, 1 files unresolved
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    64
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    65
  [1]
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    66
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    67
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    68
  --- status ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    69
  M file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    70
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    71
  C file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
    72
  --- resolve --list ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    73
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    74
  R file2
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
    75
  U file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    76
  --- debugmergestate ---
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    77
  * version 2 records
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    78
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    79
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    80
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    81
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    82
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    83
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    84
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    85
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    86
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    87
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    88
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    89
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    90
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    91
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    92
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    93
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    94
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    95
  --- file2 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    96
  2
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    97
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    98
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
    99
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   100
  <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   101
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   102
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   103
  changed1
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   104
  >>>>>>> other: 10f9a0a634e8  - test: removed file1, changed file2, changed file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   105
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   106
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   107
Interactive merge:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   108
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   109
  $ hg co -C
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   110
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   111
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   112
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   113
  > c
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   114
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   115
  > EOF
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
   116
  local changed file1 which remote deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   117
  use (c)hanged version or (d)elete? c
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   118
  remote changed file2 which local deleted
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   119
  use (c)hanged version or leave (d)eleted? d
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   120
  merging file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   121
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   122
  0 files updated, 2 files merged, 0 files removed, 1 files unresolved
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   123
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   124
  [1]
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   125
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   126
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   127
  --- status ---
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 12365
diff changeset
   128
  file2: * (glob)
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   129
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   130
  C file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   131
  --- resolve --list ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   132
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   133
  R file2
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   134
  U file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   135
  --- debugmergestate ---
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   136
  * version 2 records
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   137
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   138
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   139
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   140
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   141
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   142
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   143
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   144
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   145
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   146
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   147
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   148
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   149
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   150
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   151
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   152
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   153
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   154
  *** file2 does not exist
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   155
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   156
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   157
  <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   158
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   159
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   160
  changed1
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   161
  >>>>>>> other: 10f9a0a634e8  - test: removed file1, changed file2, changed file3
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   162
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   163
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   164
Interactive merge with bad input:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   165
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   166
  $ hg co -C
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   167
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   168
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   169
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   170
  > foo
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   171
  > bar
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   172
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   173
  > baz
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   174
  > c
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   175
  > EOF
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
   176
  local changed file1 which remote deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   177
  use (c)hanged version or (d)elete? foo
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   178
  unrecognized response
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
   179
  local changed file1 which remote deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   180
  use (c)hanged version or (d)elete? bar
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   181
  unrecognized response
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
   182
  local changed file1 which remote deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   183
  use (c)hanged version or (d)elete? d
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   184
  remote changed file2 which local deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   185
  use (c)hanged version or leave (d)eleted? baz
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   186
  unrecognized response
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   187
  remote changed file2 which local deleted
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   188
  use (c)hanged version or leave (d)eleted? c
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   189
  merging file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   190
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   191
  0 files updated, 1 files merged, 1 files removed, 1 files unresolved
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   192
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   193
  [1]
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   194
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   195
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   196
  --- status ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   197
  M file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   198
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   199
  R file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   200
  --- resolve --list ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   201
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   202
  R file2
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   203
  U file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   204
  --- debugmergestate ---
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   205
  * version 2 records
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   206
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   207
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   208
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   209
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   210
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   211
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   212
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   213
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   214
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   215
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   216
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   217
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   218
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   219
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   220
  *** file1 does not exist
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   221
  --- file2 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   222
  2
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   223
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   224
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   225
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   226
  <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   227
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   228
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   229
  changed1
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   230
  >>>>>>> other: 10f9a0a634e8  - test: removed file1, changed file2, changed file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   231
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   232
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   233
Interactive merge with not enough input:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   234
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   235
  $ hg co -C
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   236
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   237
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   238
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   239
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   240
  > EOF
18543
c8ba98bf0e71 merge: don't indent "local changed %s which remote deleted" prompt
Mads Kiilerich <madski@unity3d.com>
parents: 15521
diff changeset
   241
  local changed file1 which remote deleted
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   242
  use (c)hanged version or (d)elete? d
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 18543
diff changeset
   243
  remote changed file2 which local deleted
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   244
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   245
  merging file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   246
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   247
  0 files updated, 0 files merged, 1 files removed, 2 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   248
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   249
  [1]
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   250
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   251
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   252
  --- status ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   253
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   254
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   255
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   256
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   257
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   258
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   259
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   260
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   261
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   262
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   263
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   264
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   265
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   266
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   267
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   268
  file: file2 (record type "C", state "u", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   269
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   270
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   271
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   272
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   273
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   274
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   275
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   276
  *** file1 does not exist
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   277
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   278
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   279
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   280
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   281
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   282
  <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   283
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   284
  =======
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   285
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   286
  >>>>>>> other: 10f9a0a634e8  - test: removed file1, changed file2, changed file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   287
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   288
Choose local versions of files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   289
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   290
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   291
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   292
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   293
  $ hg merge --tool :local
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   294
  0 files updated, 3 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   295
  (branch merge, don't forget to commit)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   296
  $ status 2>&1 | tee $TESTTMP/local.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   297
  --- status ---
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 12365
diff changeset
   298
  file2: * (glob)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   299
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   300
  C file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   301
  --- resolve --list ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   302
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   303
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   304
  R file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   305
  --- debugmergestate ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   306
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   307
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   308
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   309
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   310
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   311
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   312
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   313
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   314
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   315
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   316
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   317
  file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   318
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   319
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   320
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   321
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   322
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   323
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   324
  *** file2 does not exist
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   325
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   326
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   327
  changed2
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   328
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   329
Choose other versions of files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   330
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   331
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   332
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   333
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   334
  $ hg merge --tool :other
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   335
  0 files updated, 2 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   336
  (branch merge, don't forget to commit)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   337
  $ status 2>&1 | tee $TESTTMP/other.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   338
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   339
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   340
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   341
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   342
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   343
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   344
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   345
  R file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   346
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   347
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   348
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   349
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   350
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   351
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   352
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   353
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   354
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   355
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   356
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   357
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   358
  file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   359
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   360
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   361
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   362
  *** file1 does not exist
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   363
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   364
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   365
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   366
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   367
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   368
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   369
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   370
Fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   371
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   372
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   373
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   374
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   375
  $ hg merge --tool :fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   376
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   377
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   378
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   379
  $ status 2>&1 | tee $TESTTMP/fail.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   380
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   381
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   382
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   383
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   384
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   385
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   386
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   387
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   388
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   389
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   390
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   391
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   392
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   393
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   394
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   395
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   396
  file: file2 (record type "C", state "u", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   397
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   398
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   399
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   400
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   401
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   402
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   403
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   404
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   405
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   406
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   407
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   408
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   409
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   410
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   411
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   412
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   413
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   414
Force prompts with no input (should be similar to :fail)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   415
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   416
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   417
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   418
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   419
  $ hg merge --config ui.interactive=True --tool :prompt
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   420
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   421
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   422
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   423
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   424
  no tool found to merge file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   425
  keep (l)ocal or take (o)ther? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   426
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   427
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   428
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   429
  $ status 2>&1 | tee $TESTTMP/prompt.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   430
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   431
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   432
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   433
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   434
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   435
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   436
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   437
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   438
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   439
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   440
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   441
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   442
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   443
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   444
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   445
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   446
  file: file2 (record type "C", state "u", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   447
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   448
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   449
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   450
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   451
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   452
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   453
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   454
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   455
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   456
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   457
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   458
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   459
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   460
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   461
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   462
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   463
  $ diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   464
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   465
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   466
Force prompts
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   467
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   468
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   469
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   470
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   471
  $ hg merge --tool :prompt
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   472
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   473
  use (c)hanged version or (d)elete? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   474
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   475
  use (c)hanged version or leave (d)eleted? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   476
  no tool found to merge file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   477
  keep (l)ocal or take (o)ther? l
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   478
  0 files updated, 3 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   479
  (branch merge, don't forget to commit)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   480
  $ status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   481
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   482
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   483
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   484
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   485
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   486
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   487
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   488
  R file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   489
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   490
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   491
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   492
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   493
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   494
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   495
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   496
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   497
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   498
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   499
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   500
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   501
  file: file3 (record type "F", state "r", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   502
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   503
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   504
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   505
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   506
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   507
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   508
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   509
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   510
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   511
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   512
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   513
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   514
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   515
Choose to merge all files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   516
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   517
  $ hg co -C
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   518
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   519
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   520
  $ hg merge --tool :merge3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   521
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   522
  use (c)hanged version or (d)elete? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   523
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   524
  use (c)hanged version or leave (d)eleted? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   525
  merging file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   526
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   527
  0 files updated, 2 files merged, 0 files removed, 1 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   528
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   529
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   530
  $ status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   531
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   532
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   533
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   534
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   535
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   536
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   537
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   538
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   539
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   540
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   541
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   542
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   543
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   544
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   545
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   546
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   547
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   548
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   549
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   550
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   551
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   552
    local path: file3 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   553
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   554
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   555
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   556
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   557
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   558
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   559
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   560
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   561
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   562
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   563
  <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   564
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   565
  ||||||| base
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   566
  =======
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   567
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   568
  >>>>>>> other: 10f9a0a634e8  - test: removed file1, changed file2, changed file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   569
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   570
Exercise transitions between local, other, fail and prompt, and make sure the
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   571
dirstate stays consistent. (Compare with each other and to the above
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   572
invocations.)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   573
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   574
  $ testtransitions() {
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   575
  >     # this traversal order covers every transition
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   576
  >     tools="local other prompt local fail other local prompt other fail prompt fail local"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   577
  >     lasttool="merge3"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   578
  >     for tool in $tools; do
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   579
  >         echo "=== :$lasttool -> :$tool ==="
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   580
  >         ref="$TESTTMP/$tool.status"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   581
  >         hg resolve --unmark --all
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   582
  >         hg resolve --tool ":$tool" --all --config ui.interactive=True
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   583
  >         status > "$TESTTMP/compare.status" 2>&1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   584
  >         echo '--- diff of status ---'
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   585
  >         if diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   586
  >             echo '(status identical)'
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   587
  >         fi
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   588
  >         lasttool="$tool"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   589
  >         echo
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   590
  >     done
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   591
  > }
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   592
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   593
  $ testtransitions
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   594
  === :merge3 -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   595
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   596
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   597
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   598
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   599
  === :local -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   600
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   601
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   602
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   603
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   604
  === :other -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   605
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   606
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   607
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   608
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   609
  no tool found to merge file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   610
  keep (l)ocal or take (o)ther? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   611
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   612
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   613
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   614
  === :prompt -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   615
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   616
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   617
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   618
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   619
  === :local -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   620
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   621
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   622
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   623
  === :fail -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   624
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   625
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   626
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   627
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   628
  === :other -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   629
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   630
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   631
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   632
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   633
  === :local -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   634
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   635
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   636
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   637
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   638
  no tool found to merge file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   639
  keep (l)ocal or take (o)ther? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   640
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   641
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   642
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   643
  === :prompt -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   644
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   645
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   646
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   647
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   648
  === :other -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   649
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   650
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   651
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   652
  === :fail -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   653
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   654
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   655
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   656
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   657
  no tool found to merge file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   658
  keep (l)ocal or take (o)ther? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   659
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   660
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   661
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   662
  === :prompt -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   663
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   664
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   665
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   666
  === :fail -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   667
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   668
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   669
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   670
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   671
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   672
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   673
Non-interactive linear update
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   674
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   675
  $ hg co -C 0
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   676
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   677
  $ echo changed >> file1
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   678
  $ hg rm file2
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   679
  $ hg update 1 -y
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   680
  local changed file1 which remote deleted
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   681
  use (c)hanged version or (d)elete? c
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   682
  remote changed file2 which local deleted
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   683
  use (c)hanged version or leave (d)eleted? c
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   684
  1 files updated, 2 files merged, 0 files removed, 0 files unresolved
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   685
  $ status
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   686
  --- status ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   687
  A file1
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   688
  C file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   689
  C file3
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   690
  --- resolve --list ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   691
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   692
  R file2
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   693
  --- debugmergestate ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   694
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   695
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   696
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   697
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   698
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   699
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   700
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   701
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   702
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   703
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   704
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   705
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   706
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   707
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   708
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   709
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   710
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   711
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   712
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   713
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   714
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   715
Choose local versions of files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   716
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   717
  $ hg co -C 0
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   718
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   719
  $ echo changed >> file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   720
  $ hg rm file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   721
  $ hg update 1 --tool :local
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   722
  1 files updated, 2 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   723
  $ status 2>&1 | tee $TESTTMP/local.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   724
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   725
  file2: * (glob)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   726
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   727
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   728
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   729
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   730
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   731
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   732
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   733
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   734
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   735
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   736
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   737
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   738
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   739
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   740
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   741
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   742
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   743
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   744
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   745
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   746
  *** file2 does not exist
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   747
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   748
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   749
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   750
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   751
Choose other versions of files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   752
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   753
  $ hg co -C 0
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   754
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   755
  $ echo changed >> file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   756
  $ hg rm file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   757
  $ hg update 1 --tool :other
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   758
  1 files updated, 1 files merged, 1 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   759
  $ status 2>&1 | tee $TESTTMP/other.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   760
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   761
  file1: * (glob)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   762
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   763
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   764
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   765
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   766
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   767
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   768
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   769
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   770
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   771
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   772
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   773
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   774
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   775
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   776
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   777
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   778
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   779
  *** file1 does not exist
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   780
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   781
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   782
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   783
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   784
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   785
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   786
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   787
Fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   788
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   789
  $ hg co -C 0
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   790
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   791
  $ echo changed >> file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   792
  $ hg rm file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   793
  $ hg update 1 --tool :fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   794
  1 files updated, 0 files merged, 0 files removed, 2 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   795
  use 'hg resolve' to retry unresolved file merges
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   796
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   797
  $ status 2>&1 | tee $TESTTMP/fail.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   798
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   799
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   800
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   801
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   802
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   803
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   804
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   805
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   806
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   807
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   808
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   809
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   810
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   811
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   812
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   813
  file: file2 (record type "C", state "u", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   814
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   815
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   816
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   817
  --- file1 ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   818
  1
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   819
  changed
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   820
  --- file2 ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   821
  2
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   822
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   823
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   824
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   825
  changed1
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   826
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   827
Force prompts with no input
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   828
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   829
  $ hg co -C 0
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   830
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   831
  $ echo changed >> file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   832
  $ hg rm file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   833
  $ hg update 1 --config ui.interactive=True --tool :prompt
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   834
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   835
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   836
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   837
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   838
  1 files updated, 0 files merged, 0 files removed, 2 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   839
  use 'hg resolve' to retry unresolved file merges
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   840
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   841
  $ status 2>&1 | tee $TESTTMP/prompt.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   842
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   843
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   844
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   845
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   846
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   847
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   848
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   849
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   850
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   851
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   852
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   853
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   854
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   855
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   856
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   857
  file: file2 (record type "C", state "u", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   858
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   859
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   860
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   861
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   862
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   863
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   864
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   865
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   866
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   867
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   868
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   869
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   870
  $ diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   871
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   872
Choose to merge all files
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   873
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   874
  $ hg co -C 0
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   875
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   876
  $ echo changed >> file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   877
  $ hg rm file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   878
  $ hg update 1 --tool :merge3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   879
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   880
  use (c)hanged version or (d)elete? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   881
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   882
  use (c)hanged version or leave (d)eleted? c
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   883
  1 files updated, 2 files merged, 0 files removed, 0 files unresolved
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   884
  $ status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   885
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   886
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   887
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   888
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   889
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   890
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   891
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   892
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   893
  * version 2 records
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   894
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   895
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   896
  file: file1 (record type "C", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   897
    local path: file1 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   898
    ancestor path: file1 (node b8e02f6433738021a065f94175c7cd23db5f05be)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   899
    other path: file1 (node null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   900
  file: file2 (record type "C", state "r", hash null)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   901
    local path: file2 (flags "")
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   902
    ancestor path: file2 (node 5d9299349fc01ddd25d0070d149b124d8f10411e)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   903
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   904
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   905
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   906
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   907
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   908
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   909
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   910
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   911
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   912
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   913
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   914
Test transitions between different merge tools
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   915
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   916
  $ testtransitions
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   917
  === :merge3 -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   918
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   919
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   920
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   921
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   922
  === :local -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   923
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   924
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   925
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   926
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   927
  === :other -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   928
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   929
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   930
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   931
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   932
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   933
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   934
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   935
  === :prompt -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   936
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   937
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   938
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   939
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   940
  === :local -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   941
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   942
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   943
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   944
  === :fail -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   945
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   946
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   947
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   948
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   949
  === :other -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   950
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   951
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   952
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   953
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   954
  === :local -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   955
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   956
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   957
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   958
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   959
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   960
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   961
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   962
  === :prompt -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   963
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   964
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   965
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   966
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   967
  === :other -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   968
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   969
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   970
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   971
  === :fail -> :prompt ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   972
  local changed file1 which remote deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   973
  use (c)hanged version or (d)elete? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   974
  remote changed file2 which local deleted
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   975
  use (c)hanged version or leave (d)eleted? 
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   976
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   977
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   978
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   979
  === :prompt -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   980
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   981
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   982
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   983
  === :fail -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   984
  (no more unresolved files)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   985
  --- diff of status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   986
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   987