tests/test-merge-changedelete.t
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 02 Aug 2018 16:36:40 -0700
changeset 38931 eb022ce9e505
parent 35704 41ef02ba329b
child 39304 f785073f792c
permissions -rw-r--r--
changegroup: inline ellipsisdata() There's only one caller of it. I don't think it needs to exist as a standalone function. Differential Revision: https://phab.mercurial-scm.org/D4074
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
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
    57
  local [working copy] changed file1 which other [merge rev] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    58
  use (c)hanged version, (d)elete, or leave (u)nresolved? u
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
    59
  other [merge rev] changed file2 which local [working copy] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    60
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
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')
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    63
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
    64
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27125
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 ---
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    73
  U file1
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    74
  U 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
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
    80
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
    81
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
    82
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
    83
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    84
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
27137
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: file1 (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: 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
    87
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
    88
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
    89
  file: file2 (record type "C", state "u", hash null)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
    90
    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
    91
    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
    92
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
    93
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    94
  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
    95
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    96
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
    97
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    98
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
    99
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   100
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   101
  --- file2 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   102
  2
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   103
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   104
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   105
  3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   106
  <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   107
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   108
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   109
  changed1
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   110
  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   111
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   112
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   113
Interactive merge:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   114
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   115
  $ 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
   116
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   117
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   118
  1 other heads for branch "default"
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   119
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   120
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   121
  > c
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   122
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   123
  > EOF
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   124
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   125
  use (c)hanged version, (d)elete, or leave (u)nresolved? c
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   126
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   127
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   128
  merging file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   129
  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
   130
  0 files updated, 2 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   131
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   132
  [1]
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   133
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   134
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   135
  --- status ---
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 12365
diff changeset
   136
  file2: * (glob)
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   137
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   138
  C file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   139
  --- 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
   140
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   141
  R file2
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   142
  U file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   143
  --- debugmergestate ---
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   144
  * version 2 records
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   145
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   146
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   147
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   148
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   149
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   150
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   151
  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
   152
    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
   153
    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
   154
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   155
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   156
  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
   157
    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
   158
    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
   159
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   160
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   161
  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
   162
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   163
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   164
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   165
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   166
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   167
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   168
  *** 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
   169
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   170
  3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   171
  <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   172
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   173
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   174
  changed1
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   175
  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   176
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   177
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   178
Interactive merge with bad input:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   179
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   180
  $ 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
   181
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   182
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   183
  1 other heads for branch "default"
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   184
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   185
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   186
  > foo
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   187
  > bar
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   188
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   189
  > baz
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   190
  > c
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   191
  > EOF
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   192
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   193
  use (c)hanged version, (d)elete, or leave (u)nresolved? foo
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
   194
  unrecognized response
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   195
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   196
  use (c)hanged version, (d)elete, or leave (u)nresolved? bar
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
   197
  unrecognized response
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   198
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   199
  use (c)hanged version, (d)elete, or leave (u)nresolved? d
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   200
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   201
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz
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
   202
  unrecognized response
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   203
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   204
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   205
  merging file3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   206
  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
   207
  0 files updated, 1 files merged, 1 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   208
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   209
  [1]
5672
8a65ea986755 Tests for b5605d88dc27 and 840e2b315c1f (interactive prompts during merge)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   210
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   211
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   212
  --- status ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   213
  M file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   214
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   215
  R file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   216
  --- 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
   217
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   218
  R file2
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   219
  U file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   220
  --- debugmergestate ---
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   221
  * version 2 records
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   222
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   223
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   224
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   225
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   226
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   227
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   228
  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
   229
    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
   230
    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
   231
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   232
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   233
  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
   234
    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
   235
    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
   236
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   237
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   238
  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
   239
    local path: file3 (flags "")
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   240
    ancestor path: file3 (node 2661d26c649684b482d10f91960cc3db683c38b4)
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   241
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   242
  *** file1 does not exist
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   243
  --- file2 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   244
  2
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   245
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   246
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   247
  3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   248
  <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   249
  changed2
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   250
  =======
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   251
  changed1
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   252
  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   253
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   254
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   255
Interactive merge with not enough input:
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   256
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   257
  $ 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
   258
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   259
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   260
  1 other heads for branch "default"
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   261
12365
22f3353bcc36 tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
   262
  $ hg merge --config ui.interactive=true <<EOF
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   263
  > d
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   264
  > EOF
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   265
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   266
  use (c)hanged version, (d)elete, or leave (u)nresolved? d
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   267
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   268
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   269
  merging file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   270
  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
   271
  0 files updated, 0 files merged, 1 files removed, 2 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   272
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   273
  [1]
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   274
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   275
  $ status
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   276
  --- status ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   277
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   278
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   279
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   280
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   281
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   282
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   283
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   284
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   285
  * 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
   286
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   287
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   288
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   289
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   290
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   291
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   292
  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
   293
    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
   294
    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
   295
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   296
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   297
  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
   298
    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
   299
    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
   300
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   301
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   302
  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
   303
    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
   304
    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
   305
    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
   306
  *** 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
   307
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   308
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   309
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   310
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   311
  3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   312
  <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   313
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   314
  =======
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   315
  changed1
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   316
  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   317
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   318
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
   319
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   320
  $ 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
   321
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   322
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   323
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   324
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   325
  $ 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
   326
  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
   327
  (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
   328
  $ 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
   329
  --- status ---
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 12365
diff changeset
   330
  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
   331
  M file3
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   332
  C file1
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   333
  --- 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
   334
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   335
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   336
  R file3
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   337
  --- debugmergestate ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   338
  * 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
   339
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   340
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   341
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   342
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   343
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   344
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   345
  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
   346
    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
   347
    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
   348
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   349
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   350
  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
   351
    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
   352
    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
   353
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   354
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   355
  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
   356
    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
   357
    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
   358
    other path: file3 (node a2644c43e210356772c7772a8674544a62e06beb)
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   359
  --- file1 ---
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   360
  1
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   361
  changed
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   362
  *** 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
   363
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   364
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   365
  changed2
12259
7b05cb9ac6d2 tests: unify test-merge-prompt
Adrian Buehlmann <adrian@cadifra.com>
parents: 5672
diff changeset
   366
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   367
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
   368
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   369
  $ 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
   370
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   371
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   372
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   373
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   374
  $ 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
   375
  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
   376
  (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
   377
  $ 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
   378
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   379
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   380
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   381
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   382
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   383
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   384
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   385
  R file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   386
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   387
  * 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
   388
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   389
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   390
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   391
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   392
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   393
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   394
  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
   395
    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
   396
    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
   397
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   398
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   399
  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
   400
    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
   401
    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
   402
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   403
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   404
  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
   405
    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
   406
    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
   407
    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
   408
  *** 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
   409
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   410
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   411
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   412
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   413
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   414
  changed1
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
Fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   417
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   418
  $ 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
   419
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   420
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   421
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   422
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   423
  $ 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
   424
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   425
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   426
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   427
  $ 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
   428
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   429
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   430
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   431
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   432
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   433
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   434
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   435
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   436
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   437
  * 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
   438
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   439
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   440
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   441
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   442
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   443
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   444
  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
   445
    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
   446
    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
   447
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   448
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   449
  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
   450
    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
   451
    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
   452
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   453
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   454
  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
   455
    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
   456
    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
   457
    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
   458
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   459
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   460
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   461
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   462
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   463
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   464
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   465
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   466
  changed2
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
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
   469
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   470
  $ 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
   471
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   472
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   473
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   474
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   475
  $ hg merge --config ui.interactive=True --tool :prompt
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   476
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   477
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   478
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   479
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30469
diff changeset
   480
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   481
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   482
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   483
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   484
  $ 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
   485
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   486
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   487
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   488
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   489
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   490
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   491
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   492
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   493
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   494
  * 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
   495
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   496
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   497
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   498
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   499
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   500
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   501
  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
   502
    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
   503
    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
   504
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   505
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   506
  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
   507
    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
   508
    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
   509
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   510
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   511
  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
   512
    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
   513
    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
   514
    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
   515
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   516
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   517
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   518
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   519
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   520
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   521
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   522
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   523
  changed2
27557
28b5c4fcf48d tests: Solaris diff -U also emits "No differences encountered"
Danek Duvall <danek.duvall@oracle.com>
parents: 27164
diff changeset
   524
  $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   525
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   526
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   527
Force prompts
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   528
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   529
  $ 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
   530
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   531
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   532
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   533
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   534
  $ hg merge --tool :prompt
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   535
  local [working copy] changed file1 which other [merge rev] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   536
  use (c)hanged version, (d)elete, or leave (u)nresolved? u
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   537
  other [merge rev] changed file2 which local [working copy] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   538
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30469
diff changeset
   539
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   540
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   541
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
   542
  [1]
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   543
  $ status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   544
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   545
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   546
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   547
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   548
  --- resolve --list ---
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   549
  U file1
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   550
  U file2
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
   551
  U file3
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   552
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   553
  * 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
   554
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   555
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   556
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   557
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   558
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   559
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   560
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   561
    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
   562
    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
   563
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   564
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   565
  file: file2 (record type "C", state "u", hash null)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   566
    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
   567
    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
   568
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   569
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27163
diff changeset
   570
  file: file3 (record type "F", state "u", hash d5b0a58bc47161b1b8a831084b366f757c4f0b11)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   571
    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
   572
    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
   573
    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
   574
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   575
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   576
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   577
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   578
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   579
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   580
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   581
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   582
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   583
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   584
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
   585
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   586
  $ 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
   587
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32293
diff changeset
   588
  updated to "13910f48cf7b: changed file1, removed file2, changed file3"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28011
diff changeset
   589
  1 other heads for branch "default"
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   590
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   591
  $ hg merge --tool :merge3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   592
  local [working copy] changed file1 which other [merge rev] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   593
  use (c)hanged version, (d)elete, or leave (u)nresolved? u
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   594
  other [merge rev] changed file2 which local [working copy] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   595
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   596
  merging file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   597
  warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   598
  0 files updated, 0 files merged, 0 files removed, 3 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32718
diff changeset
   599
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   600
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   601
  $ 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 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   603
  M file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   604
  M file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   605
  C file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   606
  --- resolve --list ---
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   607
  U file1
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   608
  U file2
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   609
  U file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   610
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   611
  * 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
   612
  local: 13910f48cf7bdb2a0ba6e24b4900e4fdd5739dd4
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   613
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   614
  labels:
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   615
    local: working copy
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   616
    other: merge rev
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   617
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   618
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   619
    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
   620
    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
   621
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   622
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   623
  file: file2 (record type "C", state "u", hash null)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   624
    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
   625
    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
   626
    other path: file2 (node e7c1328648519852e723de86c0c0525acd779257)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   627
  file extras: file3 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   628
  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
   629
    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
   630
    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
   631
    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
   632
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   633
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   634
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   635
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   636
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   637
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   638
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   639
  3
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   640
  <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   641
  changed2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   642
  ||||||| base
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   643
  =======
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   644
  changed1
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   645
  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   646
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   647
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
   648
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
   649
invocations.)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   650
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   651
  $ testtransitions() {
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   652
  >     # 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
   653
  >     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
   654
  >     lasttool="merge3"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   655
  >     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
   656
  >         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
   657
  >         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
   658
  >         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
   659
  >         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
   660
  >         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
   661
  >         echo '--- diff of status ---'
27557
28b5c4fcf48d tests: Solaris diff -U also emits "No differences encountered"
Danek Duvall <danek.duvall@oracle.com>
parents: 27164
diff changeset
   662
  >         if cmp "$TESTTMP/$tool.status" "$TESTTMP/compare.status" || diff -U8 "$TESTTMP/$tool.status" "$TESTTMP/compare.status"; then
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   663
  >             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
   664
  >         fi
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   665
  >         lasttool="$tool"
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   666
  >         echo
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   667
  >     done
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   668
  > }
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   669
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   670
  $ testtransitions
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   671
  === :merge3 -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   672
  (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
   673
  --- 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
   674
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   675
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   676
  === :local -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   677
  (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
   678
  --- 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
   679
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   680
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   681
  === :other -> :prompt ===
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   682
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   683
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   684
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   685
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30469
diff changeset
   686
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   687
  --- 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
   688
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   689
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   690
  === :prompt -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   691
  (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
   692
  --- 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
   693
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   694
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   695
  === :local -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   696
  --- 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
   697
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   698
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   699
  === :fail -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   700
  (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
   701
  --- 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
   702
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   703
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   704
  === :other -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   705
  (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
   706
  --- 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
   707
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   708
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   709
  === :local -> :prompt ===
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   710
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   711
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   712
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   713
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30469
diff changeset
   714
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   715
  --- 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
   716
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   717
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   718
  === :prompt -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   719
  (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
   720
  --- 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
   721
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   722
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   723
  === :other -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   724
  --- 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
   725
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   726
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   727
  === :fail -> :prompt ===
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   728
  local [working copy] changed file1 which other [merge rev] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   729
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 29786
diff changeset
   730
  other [merge rev] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   731
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30469
diff changeset
   732
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   733
  --- 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
   734
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   735
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   736
  === :prompt -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   737
  --- 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
   738
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   739
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   740
  === :fail -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   741
  (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
   742
  --- 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
   743
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   744
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   745
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   746
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   747
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
   748
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   749
  $ 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
   750
  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
   751
  $ 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
   752
  $ 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
   753
  $ hg update 1 -y
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   754
  local [working copy] changed file1 which other [destination] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   755
  use (c)hanged version, (d)elete, or leave (u)nresolved? u
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   756
  other [destination] changed file2 which local [working copy] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   757
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   758
  1 files updated, 0 files merged, 0 files removed, 2 files unresolved
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   759
  use 'hg resolve' to retry unresolved file merges
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   760
  [1]
26850
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   761
  $ status
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   762
  --- status ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   763
  A file1
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   764
  C file2
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   765
  C file3
27126
72b4e1bf8f28 test-merge-changedelete.t: add resolve --list output
Siddharth Agarwal <sid0@fb.com>
parents: 27125
diff changeset
   766
  --- resolve --list ---
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   767
  U file1
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   768
  U file2
27136
29b08ca680b0 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com>
parents: 27126
diff changeset
   769
  --- debugmergestate ---
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   770
  * 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
   771
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   772
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   773
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   774
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   775
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   776
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   777
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   778
    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
   779
    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
   780
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   781
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   782
  file: file2 (record type "C", state "u", hash null)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   783
    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
   784
    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
   785
    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
   786
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   787
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   788
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   789
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   790
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   791
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   792
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   793
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   794
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   795
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   796
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
   797
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   798
  $ 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
   799
  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
   800
  $ 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
   801
  $ 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
   802
  $ 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
   803
  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
   804
  $ 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
   805
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   806
  file2: * (glob)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   807
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   808
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   809
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   810
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   811
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   812
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   813
  * 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
   814
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   815
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   816
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   817
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   818
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   819
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   820
  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
   821
    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
   822
    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
   823
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   824
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   825
  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
   826
    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
   827
    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
   828
    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
   829
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   830
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   831
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   832
  *** 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
   833
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   834
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   835
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   836
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   837
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
   838
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   839
  $ 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
   840
  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
   841
  $ 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
   842
  $ 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
   843
  $ 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
   844
  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
   845
  $ 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
   846
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   847
  file1: * (glob)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   848
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   849
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   850
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   851
  R file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   852
  R file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   853
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   854
  * 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
   855
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   856
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   857
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   858
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   859
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   860
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   861
  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
   862
    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
   863
    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
   864
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   865
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   866
  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
   867
    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
   868
    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
   869
    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
   870
  *** 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
   871
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   872
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   873
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   874
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   875
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   876
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   877
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   878
Fail
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   879
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   880
  $ 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
   881
  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
   882
  $ 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
   883
  $ 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
   884
  $ 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
   885
  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
   886
  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
   887
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   888
  $ 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
   889
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   890
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   891
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   892
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   893
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   894
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   895
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   896
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   897
  * 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
   898
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   899
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   900
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   901
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   902
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   903
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   904
  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
   905
    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
   906
    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
   907
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   908
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   909
  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
   910
    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
   911
    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
   912
    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
   913
  --- file1 ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   914
  1
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   915
  changed
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   916
  --- file2 ---
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   917
  2
00209e38e7d9 test-merge-prompt.t: add tests for linear updates + change/delete conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 22589
diff changeset
   918
  changed
27125
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   919
  --- file3 ---
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   920
  3
969ca40cad1d test-merge-changedelete.t: add a file with regular merge conflicts
Siddharth Agarwal <sid0@fb.com>
parents: 26947
diff changeset
   921
  changed1
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   922
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   923
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
   924
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   925
  $ 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
   926
  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
   927
  $ 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
   928
  $ 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
   929
  $ hg update 1 --config ui.interactive=True --tool :prompt
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   930
  local [working copy] changed file1 which other [destination] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   931
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   932
  other [destination] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   933
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   934
  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
   935
  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
   936
  [1]
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   937
  $ 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
   938
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   939
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   940
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   941
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   942
  --- resolve --list ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   943
  U file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   944
  U file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   945
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   946
  * 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
   947
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   948
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   949
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   950
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   951
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   952
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   953
  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
   954
    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
   955
    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
   956
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
   957
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   958
  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
   959
    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
   960
    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
   961
    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
   962
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   963
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   964
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   965
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   966
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   967
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   968
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   969
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   970
  changed1
27557
28b5c4fcf48d tests: Solaris diff -U also emits "No differences encountered"
Danek Duvall <danek.duvall@oracle.com>
parents: 27164
diff changeset
   971
  $ cmp $TESTTMP/fail.status $TESTTMP/prompt.status || diff -U8 $TESTTMP/fail.status $TESTTMP/prompt.status
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   972
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   973
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
   974
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   975
  $ 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
   976
  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
   977
  $ 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
   978
  $ 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
   979
  $ hg update 1 --tool :merge3
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   980
  local [working copy] changed file1 which other [destination] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   981
  use (c)hanged version, (d)elete, or leave (u)nresolved? u
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
   982
  other [destination] changed file2 which local [working copy] deleted
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   983
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   984
  1 files updated, 0 files merged, 0 files removed, 2 files unresolved
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   985
  use 'hg resolve' to retry unresolved file merges
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   986
  [1]
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   987
  $ status
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   988
  --- status ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   989
  A file1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   990
  C file2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   991
  C file3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   992
  --- resolve --list ---
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   993
  U file1
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
   994
  U file2
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   995
  --- debugmergestate ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   996
  * 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
   997
  local: ab57bf49aa276a22d35a473592d4c34b5abc3eff
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
   998
  other: 10f9a0a634e82080907e62f075ab119cbc565ea6
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
   999
  labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
  1000
    local: working copy
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28029
diff changeset
  1001
    other: destination
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
  1002
  file extras: file1 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
  1003
  file: file1 (record type "C", state "u", hash 60b27f004e454aca81b0480209cce5081ec52390)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1004
    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
  1005
    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
  1006
    other path: file1 (node null)
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 27599
diff changeset
  1007
  file extras: file2 (ancestorlinknode = ab57bf49aa276a22d35a473592d4c34b5abc3eff)
27599
ad5966de3c9a filemerge: default change/delete conflicts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27557
diff changeset
  1008
  file: file2 (record type "C", state "u", hash null)
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1009
    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
  1010
    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
  1011
    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
  1012
  --- file1 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1013
  1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1014
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1015
  --- file2 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1016
  2
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1017
  changed
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1018
  --- file3 ---
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1019
  3
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1020
  changed1
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1021
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1022
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
  1023
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1024
  $ testtransitions
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1025
  === :merge3 -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1026
  (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
  1027
  --- 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
  1028
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1029
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1030
  === :local -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1031
  (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
  1032
  --- 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
  1033
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1034
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1035
  === :other -> :prompt ===
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1036
  local [working copy] changed file1 which other [destination] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1037
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1038
  other [destination] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1039
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1040
  --- 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
  1041
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1042
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1043
  === :prompt -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1044
  (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
  1045
  --- 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
  1046
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1047
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1048
  === :local -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1049
  --- 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
  1050
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1051
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1052
  === :fail -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1053
  (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
  1054
  --- 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
  1055
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1056
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1057
  === :other -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1058
  (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
  1059
  --- 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
  1060
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1061
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1062
  === :local -> :prompt ===
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1063
  local [working copy] changed file1 which other [destination] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1064
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1065
  other [destination] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1066
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1067
  --- 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
  1068
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1069
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1070
  === :prompt -> :other ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1071
  (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
  1072
  --- 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
  1073
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1074
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1075
  === :other -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1076
  --- 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
  1077
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1078
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1079
  === :fail -> :prompt ===
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1080
  local [working copy] changed file1 which other [destination] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1081
  use (c)hanged version, (d)elete, or leave (u)nresolved? 
29786
978b907d9b36 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com>
parents: 29785
diff changeset
  1082
  other [destination] changed file2 which local [working copy] deleted
27163
27b89a0957ec filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
  1083
  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
27137
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1084
  --- 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
  1085
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1086
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1087
  === :prompt -> :fail ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1088
  --- 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
  1089
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1090
  
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1091
  === :fail -> :local ===
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1092
  (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
  1093
  --- 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
  1094
  (status identical)
25e4b2f000c5 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com>
parents: 27136
diff changeset
  1095