tests/test-merge-tools.t
author Yuya Nishihara <yuya@tcha.org>
Thu, 17 May 2018 21:55:00 +0900
changeset 38071 a4a5c3085ea9
parent 37080 1e30a26a65d0
child 38074 242eb5132203
permissions -rw-r--r--
test-merge-tools: create repo directory to free $TESTTMP for temporary files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     1
test merge-tools configuration - mostly exercising filemerge.py
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     3
  $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
     4
  $ hg init repo
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
     5
  $ cd repo
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     6
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     7
revision 0
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
     8
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     9
  $ echo "revision 0" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    10
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    11
  $ hg commit -Am "revision 0"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    12
  adding f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    13
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    14
revision 1
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    15
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    16
  $ echo "revision 1" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    17
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    18
  $ hg commit -Am "revision 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    19
  $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    20
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    21
revision 2
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    22
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    23
  $ echo "revision 2" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    24
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    25
  $ hg commit -Am "revision 2"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    26
  created new head
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    27
  $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    28
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    29
revision 3 - simple to merge
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    30
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    31
  $ echo "revision 3" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    32
  $ hg commit -Am "revision 3"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    33
  created new head
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    34
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    35
revision 4 - hard to merge
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    36
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    37
  $ hg update 0 > /dev/null
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    38
  $ echo "revision 4" > f
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    39
  $ hg commit -Am "revision 4"
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    40
  created new head
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
    41
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    42
  $ echo "[merge-tools]" > .hg/hgrc
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
    43
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    44
  $ beforemerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    45
  >   cat .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    46
  >   echo "# hg update -C 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    47
  >   hg update -C 1 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    48
  > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    49
  $ aftermerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    50
  >   echo "# cat f"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    51
  >   cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    52
  >   echo "# hg stat"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    53
  >   hg stat
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
    54
  >   echo "# hg resolve --list"
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
    55
  >   hg resolve --list
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    56
  >   rm -f f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    57
  > }
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    58
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    59
Tool selection
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    60
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    61
default is internal merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    62
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    63
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    64
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    65
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    66
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    67
hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    68
override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    69
running from a devel copy, not a temp installation
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    70
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
    71
  $ PATH="$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    72
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
    73
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    74
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
    75
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    76
  [1]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    77
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    78
  # cat f
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
    79
  <<<<<<< working copy: ef83787e2614 - test: revision 1
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    80
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    81
  =======
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    82
  revision 2
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
    83
  >>>>>>> merge rev:    0185f4e0cf02 - test: revision 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    84
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    85
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    86
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    87
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
    88
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
    89
  U f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    90
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    91
simplest hgrc using false for merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    92
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    93
  $ echo "false.whatever=" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
    94
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    96
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    97
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
    98
  $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    99
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   100
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   101
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   102
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   103
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   104
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   105
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   106
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   107
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   108
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   109
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   110
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   111
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   112
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   113
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
   114
#if unix-permissions
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
   115
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   116
unexecutable file in $PATH shouldn't be found:
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   117
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
   118
  $ echo "echo fail" > false
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   119
  $ hg up -qC 1
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
   120
  $ PATH="`pwd`:$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   121
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
   122
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   123
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   124
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   125
  [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   126
  $ rm false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   127
24809
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
   128
#endif
32d0d2f38910 tests: fix portability issue with test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 24121
diff changeset
   129
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   130
executable directory in $PATH shouldn't be found:
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   131
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   132
  $ mkdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   133
  $ hg up -qC 1
26168
b907051df5b7 test-merge-tools: include /usr/sbin in path for sysctl (issue4813)
timeless@mozdev.org
parents: 25753
diff changeset
   134
  $ PATH="`pwd`:$BINDIR:/usr/sbin" $PYTHON "$BINDIR"/hg merge -r 2
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   135
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
   136
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   137
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   138
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   139
  [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   140
  $ rmdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   141
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   142
true with higher .priority gets precedence:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   143
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   144
  $ echo "true.priority=1" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   145
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   146
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   147
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   148
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   149
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   150
  $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   151
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   152
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   153
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   154
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   155
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   156
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   157
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   158
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   159
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   160
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   161
  R f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   162
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   163
unless lowered on command line:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   164
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   165
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   166
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   167
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   168
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   169
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   170
  $ hg merge -r 2 --config merge-tools.true.priority=-7
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   171
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   172
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   173
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   174
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   175
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   176
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   177
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   178
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   179
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   180
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   181
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   182
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   183
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   184
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   185
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   186
or false set higher on command line:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   187
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   188
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   189
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   190
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   191
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   192
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   193
  $ hg merge -r 2 --config merge-tools.false.priority=117
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   194
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   195
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   196
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   197
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   198
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   199
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   200
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   201
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   202
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   203
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   204
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   205
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   206
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   207
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   208
26730
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   209
or true set to disabled:
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   210
  $ beforemerge
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   211
  [merge-tools]
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   212
  false.whatever=
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   213
  true.priority=1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   214
  # hg update -C 1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   215
  $ hg merge -r 2 --config merge-tools.true.disabled=yes
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   216
  merging f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   217
  merging f failed!
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   218
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   219
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
26730
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   220
  [1]
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   221
  $ aftermerge
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   222
  # cat f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   223
  revision 1
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   224
  space
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   225
  # hg stat
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   226
  M f
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   227
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   228
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   229
  U f
26730
a1e43e85d294 merge-tools: allow marking a mergetool as completely disabled
Augie Fackler <augie@google.com>
parents: 26614
diff changeset
   230
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   231
or true.executable not found in PATH:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   232
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   233
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   234
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   235
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   236
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   237
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   238
  $ hg merge -r 2 --config merge-tools.true.executable=nonexistentmergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   239
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   240
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   241
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   242
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   243
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   244
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   245
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   246
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   247
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   248
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   249
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   250
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   251
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   252
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   253
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   254
or true.executable with bogus path:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   255
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   256
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   257
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   258
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   259
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   260
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   261
  $ hg merge -r 2 --config merge-tools.true.executable=/nonexistent/mergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   262
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   263
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   264
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   265
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   266
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   267
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   268
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   269
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   270
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   271
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   272
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   273
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   274
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   275
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   276
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   277
but true.executable set to cat found in PATH works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   278
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   279
  $ echo "true.executable=cat" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   280
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   281
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   282
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   283
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   284
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   285
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   286
  $ hg merge -r 2
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
   287
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   288
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   289
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   290
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   291
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   292
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   293
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   294
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   295
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   296
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   297
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   298
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   299
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   300
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   301
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   302
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   303
  R f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   304
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   305
and true.executable set to cat with path works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   306
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   307
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   308
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   309
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   310
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   311
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   312
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   313
  $ hg merge -r 2 --config merge-tools.true.executable=cat
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
   314
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   315
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   316
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   317
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   318
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   319
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   320
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   321
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   322
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   323
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   324
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   325
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   326
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   327
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   328
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   329
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   330
  R f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   331
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   332
#if unix-permissions
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   333
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   334
environment variables in true.executable are handled:
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   335
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
   336
  $ echo 'echo "custom merge tool"' > .hg/merge.sh
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   337
  $ beforemerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   338
  [merge-tools]
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   339
  false.whatever=
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   340
  true.priority=1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   341
  true.executable=cat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   342
  # hg update -C 1
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
   343
  $ hg --config merge-tools.true.executable='sh' \
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
   344
  >    --config merge-tools.true.args=.hg/merge.sh \
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
   345
  >    merge -r 2
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   346
  merging f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   347
  custom merge tool
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   348
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   349
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   350
  $ aftermerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   351
  # cat f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   352
  revision 1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   353
  space
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   354
  # hg stat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   355
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   356
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   357
  R f
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   358
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   359
#endif
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   360
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   361
Tool selection and merge-patterns
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   362
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   363
merge-patterns specifies new tool false:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   364
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   365
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   366
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   367
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   368
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   369
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   370
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   371
  $ hg merge -r 2 --config merge-patterns.f=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   372
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   373
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   374
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   375
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   376
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   377
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   378
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   379
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   380
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   381
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   382
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   383
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   384
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   385
  U f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   386
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   387
merge-patterns specifies executable not found in PATH and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   388
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   389
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   390
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   391
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   392
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   393
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   394
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   395
  $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool
32294
177742666abd filemerge: make warning message more i18n friendly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32293
diff changeset
   396
  couldn't find merge tool true (for pattern f)
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   397
  merging f
32294
177742666abd filemerge: make warning message more i18n friendly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32293
diff changeset
   398
  couldn't find merge tool true (for pattern f)
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   399
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   400
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   401
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   402
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   403
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   404
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   405
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   406
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   407
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   408
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   409
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   410
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   411
  U f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   412
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   413
merge-patterns specifies executable with bogus path and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   414
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   415
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   416
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   417
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   418
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   419
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   420
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   421
  $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool
32294
177742666abd filemerge: make warning message more i18n friendly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32293
diff changeset
   422
  couldn't find merge tool true (for pattern f)
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   423
  merging f
32294
177742666abd filemerge: make warning message more i18n friendly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32293
diff changeset
   424
  couldn't find merge tool true (for pattern f)
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   425
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   426
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   427
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   428
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   429
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   430
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   431
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   432
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   433
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   434
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   435
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   436
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   437
  U f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   438
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   439
ui.merge overrules priority
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   440
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   441
ui.merge specifies false:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   442
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   443
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   444
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   445
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   446
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   447
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   448
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   449
  $ hg merge -r 2 --config ui.merge=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   450
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   451
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   452
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   453
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   454
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   455
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   456
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   457
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   458
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   459
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   460
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   461
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   462
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   463
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   464
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   465
ui.merge specifies internal:fail:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   466
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   467
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   468
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   469
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   470
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   471
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   472
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   473
  $ hg merge -r 2 --config ui.merge=internal:fail
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   474
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   475
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   476
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   477
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   478
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   479
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   480
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   481
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   482
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   483
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   484
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   485
22706
ad25986c4cd3 filemerge: introduce :x as short version of internal:x merge tool name
Mads Kiilerich <madski@unity3d.com>
parents: 22032
diff changeset
   486
ui.merge specifies :local (without internal prefix):
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   487
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   488
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   489
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   490
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   491
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   492
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   493
  # hg update -C 1
22706
ad25986c4cd3 filemerge: introduce :x as short version of internal:x merge tool name
Mads Kiilerich <madski@unity3d.com>
parents: 22032
diff changeset
   494
  $ hg merge -r 2 --config ui.merge=:local
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   495
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   496
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   497
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   498
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   499
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   500
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   501
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   502
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   503
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   504
  R f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   505
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   506
ui.merge specifies internal:other:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   507
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   508
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   509
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   510
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   511
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   512
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   513
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   514
  $ hg merge -r 2 --config ui.merge=internal:other
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   515
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   516
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   517
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   518
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   519
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   520
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   521
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   522
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   523
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   524
  R f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   525
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   526
ui.merge specifies internal:prompt:
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   527
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   528
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   529
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   530
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   531
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   532
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   533
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   534
  $ hg merge -r 2 --config ui.merge=internal:prompt
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   535
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   536
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   537
  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: 27162
diff changeset
   538
  [1]
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   539
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   540
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   541
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   542
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   543
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   544
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   545
  # hg resolve --list
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   546
  U f
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   547
27162
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   548
ui.merge specifies :prompt, with 'leave unresolved' chosen
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   549
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   550
  $ beforemerge
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   551
  [merge-tools]
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   552
  false.whatever=
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   553
  true.priority=1
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   554
  true.executable=cat
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   555
  # hg update -C 1
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   556
  $ hg merge -r 2 --config ui.merge=:prompt --config ui.interactive=True << EOF
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   557
  > u
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   558
  > EOF
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   559
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
27162
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   560
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   561
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
27162
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   562
  [1]
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   563
  $ aftermerge
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   564
  # cat f
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   565
  revision 1
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   566
  space
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   567
  # hg stat
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   568
  M f
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   569
  # hg resolve --list
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   570
  U f
4ab69be0ea15 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com>
parents: 26967
diff changeset
   571
26898
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   572
prompt with EOF
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   573
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   574
  $ beforemerge
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   575
  [merge-tools]
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   576
  false.whatever=
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   577
  true.priority=1
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   578
  true.executable=cat
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   579
  # hg update -C 1
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   580
  $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   581
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? 
26898
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   582
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   583
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
26898
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   584
  [1]
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   585
  $ aftermerge
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   586
  # cat f
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   587
  revision 1
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   588
  space
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   589
  # hg stat
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   590
  M f
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   591
  # hg resolve --list
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   592
  U f
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   593
  $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   594
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? 
26898
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   595
  [1]
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   596
  $ aftermerge
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   597
  # cat f
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   598
  revision 1
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   599
  space
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   600
  # hg stat
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   601
  M f
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   602
  ? f.orig
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   603
  # hg resolve --list
33eb8a56d0c9 filemerge: treat EOF at prompt as fail, not abort
Siddharth Agarwal <sid0@fb.com>
parents: 26897
diff changeset
   604
  U f
26899
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   605
  $ rm f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   606
  $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   607
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? 
26899
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   608
  [1]
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   609
  $ aftermerge
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   610
  # cat f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   611
  revision 1
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   612
  space
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   613
  # hg stat
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   614
  M f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   615
  # hg resolve --list
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   616
  U f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   617
  $ hg resolve --all --config ui.merge=internal:prompt
32293
7d4ce4b567c5 filemerge: show warning about choice of :prompt only at an actual fallback
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30547
diff changeset
   618
  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   619
  [1]
26899
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   620
  $ aftermerge
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   621
  # cat f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   622
  revision 1
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   623
  space
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   624
  # hg stat
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   625
  M f
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   626
  ? f.orig
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   627
  # hg resolve --list
27164
88d5db4b155c filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com>
parents: 27162
diff changeset
   628
  U f
26899
5f88e092f82c resolve: don't abort when file is missing
Siddharth Agarwal <sid0@fb.com>
parents: 26898
diff changeset
   629
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   630
ui.merge specifies internal:dump:
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   631
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   632
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   633
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   634
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   635
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   636
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   637
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   638
  $ hg merge -r 2 --config ui.merge=internal:dump
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   639
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   640
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   641
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   642
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   643
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   644
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   645
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   646
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   647
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   648
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   649
  ? f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   650
  ? f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   651
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   652
  ? f.other
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   653
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   654
  U f
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   655
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   656
f.base:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   657
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   658
  $ cat f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   659
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   660
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   661
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   662
f.local:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   663
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   664
  $ cat f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   665
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   666
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   667
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   668
f.other:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   669
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   670
  $ cat f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   671
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   672
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   673
  $ rm f.base f.local f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   674
32295
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   675
check that internal:dump doesn't dump files if premerge runs
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   676
successfully
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   677
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   678
  $ beforemerge
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   679
  [merge-tools]
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   680
  false.whatever=
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   681
  true.priority=1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   682
  true.executable=cat
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   683
  # hg update -C 1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   684
  $ hg merge -r 3 --config ui.merge=internal:dump
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   685
  merging f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   686
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   687
  (branch merge, don't forget to commit)
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   688
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   689
  $ aftermerge
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   690
  # cat f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   691
  revision 1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   692
  space
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   693
  revision 3
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   694
  # hg stat
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   695
  M f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   696
  # hg resolve --list
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   697
  R f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   698
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   699
check that internal:forcedump dumps files, even if local and other can
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   700
be merged easily
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   701
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   702
  $ beforemerge
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   703
  [merge-tools]
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   704
  false.whatever=
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   705
  true.priority=1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   706
  true.executable=cat
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   707
  # hg update -C 1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   708
  $ hg merge -r 3 --config ui.merge=internal:forcedump
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   709
  merging f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   710
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   711
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
32295
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   712
  [1]
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   713
  $ aftermerge
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   714
  # cat f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   715
  revision 1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   716
  space
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   717
  # hg stat
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   718
  M f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   719
  ? f.base
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   720
  ? f.local
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   721
  ? f.orig
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   722
  ? f.other
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   723
  # hg resolve --list
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   724
  U f
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   725
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   726
  $ cat f.base
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   727
  revision 0
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   728
  space
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   729
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   730
  $ cat f.local
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   731
  revision 1
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   732
  space
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   733
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   734
  $ cat f.other
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   735
  revision 0
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   736
  space
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   737
  revision 3
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   738
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   739
  $ rm -f f.base f.local f.other
7e35d31b41fd filemerge: add internal merge tool to dump files forcibly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32294
diff changeset
   740
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   741
ui.merge specifies internal:other but is overruled by pattern for false:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
   742
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   743
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   744
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   745
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   746
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   747
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   748
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   749
  $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   750
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   751
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   752
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   753
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   754
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   755
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   756
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   757
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   758
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   759
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   760
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   761
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   762
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   763
  U f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   764
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   765
Premerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   766
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   767
ui.merge specifies internal:other but is overruled by --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   768
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   769
  $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   770
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   771
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   772
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   773
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   774
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   775
  $ hg merge -r 2 --config ui.merge=internal:other --tool=false
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   776
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   777
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   778
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   779
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   780
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   781
  $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   782
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   783
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   784
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   785
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   786
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   787
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   788
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   789
  U f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   790
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   791
HGMERGE specifies internal:other but is overruled by --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   792
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   793
  $ HGMERGE=internal:other ; export HGMERGE
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   794
  $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   795
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   796
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   797
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   798
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   799
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   800
  $ hg merge -r 2 --tool=false
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   801
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   802
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   803
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
   804
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   805
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   806
  $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   807
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   808
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   809
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   810
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   811
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   812
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   813
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   814
  U f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   815
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   816
  $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   817
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   818
update is a merge ...
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   819
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   820
(this also tests that files reverted with '--rev REV' are treated as
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   821
"modified", even if none of mode, size and timestamp of them isn't
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   822
changed on the filesystem (see also issue4583))
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   823
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   824
  $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   825
  > [fakedirstatewritetime]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   826
  > # emulate invoking dirstate.write() via repo.status()
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   827
  > # at 2000-01-01 00:00
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   828
  > fakenow = 200001010000
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   829
  > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   830
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   831
  $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   832
  [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   833
  false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   834
  true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   835
  true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   836
  # hg update -C 1
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
   837
  $ hg update -q 0
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   838
  $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   839
  f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   840
  $ touch -t 200001010000 f
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   841
  $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   842
  $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   843
  > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   844
  > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   845
  > EOF
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
   846
  $ hg revert -q -r 1 .
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   847
  $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   848
  > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   849
  > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   850
  > EOF
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   851
  $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   852
  f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   853
  $ touch -t 200001010000 f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   854
  $ hg status f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   855
  M f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   856
  $ hg update -r 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   857
  merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   858
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   859
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   860
  revision 0
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   861
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   862
  revision 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   863
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   864
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   865
  $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   866
  # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   867
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   868
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   869
  # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   870
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   871
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   872
  R f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   873
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   874
update should also have --tool
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   875
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   876
  $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   877
  [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   878
  false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   879
  true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   880
  true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   881
  # hg update -C 1
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
   882
  $ hg update -q 0
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   883
  $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   884
  f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   885
  $ touch -t 200001010000 f
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   886
  $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   887
  $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   888
  > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   889
  > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   890
  > EOF
24121
9d0b6ef92eb2 test-merge-tools: fix flaky test by avoiding debugsetparents
Martin von Zweigbergk <martinvonz@google.com>
parents: 22707
diff changeset
   891
  $ hg revert -q -r 1 .
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   892
  $ cat >> $HGRCPATH <<EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   893
  > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   894
  > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24843
diff changeset
   895
  > EOF
24843
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   896
  $ f -s f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   897
  f: size=17
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   898
  $ touch -t 200001010000 f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   899
  $ hg status f
21b33f0460e0 revert: apply normallookup on reverted file if size isn't changed (issue4583)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24809
diff changeset
   900
  M f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   901
  $ hg update -r 2 --tool false
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   902
  merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   903
  merging f failed!
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   904
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   905
  use 'hg resolve' to retry unresolved file merges
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   906
  [1]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   907
  $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   908
  # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   909
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   910
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   911
  # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   912
  M f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   913
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   914
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   915
  U f
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   916
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   917
Default is silent simplemerge:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
   918
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   919
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   920
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   921
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   922
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   923
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   924
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   925
  $ hg merge -r 3
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   926
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   927
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   928
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   929
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   930
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   931
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   932
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   933
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   934
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   935
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   936
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   937
  R f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   938
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   939
.premerge=True is same:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   940
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   941
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   942
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   943
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   944
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   945
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   946
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   947
  $ hg merge -r 3 --config merge-tools.true.premerge=True
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   948
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   949
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   950
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   951
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   952
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   953
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   954
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   955
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   956
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   957
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   958
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   959
  R f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   960
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   961
.premerge=False executes merge-tool:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   962
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   963
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   964
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   965
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   966
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   967
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   968
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   969
  $ hg merge -r 3 --config merge-tools.true.premerge=False
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
   970
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   971
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   972
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   973
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   974
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   975
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   976
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   977
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   978
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   979
  (branch merge, don't forget to commit)
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   980
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   981
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   982
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   983
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   984
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   985
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   986
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
   987
  R f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   988
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   989
premerge=keep keeps conflict markers in:
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   990
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   991
  $ beforemerge
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   992
  [merge-tools]
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   993
  false.whatever=
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   994
  true.priority=1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   995
  true.executable=cat
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   996
  # hg update -C 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   997
  $ hg merge -r 4 --config merge-tools.true.premerge=keep
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
   998
  merging f
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
   999
  <<<<<<< working copy: ef83787e2614 - test: revision 1
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1000
  revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1001
  space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1002
  =======
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1003
  revision 4
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 27164
diff changeset
  1004
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1005
  revision 0
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1006
  space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1007
  revision 4
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1008
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1009
  (branch merge, don't forget to commit)
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1010
  $ aftermerge
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1011
  # cat f
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
  1012
  <<<<<<< working copy: ef83787e2614 - test: revision 1
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1013
  revision 1
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1014
  space
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1015
  =======
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1016
  revision 4
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 27164
diff changeset
  1017
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1018
  # hg stat
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1019
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1020
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1021
  R f
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1022
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1023
premerge=keep-merge3 keeps conflict markers with base content:
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1024
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1025
  $ beforemerge
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1026
  [merge-tools]
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1027
  false.whatever=
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1028
  true.priority=1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1029
  true.executable=cat
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1030
  # hg update -C 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1031
  $ hg merge -r 4 --config merge-tools.true.premerge=keep-merge3
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1032
  merging f
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
  1033
  <<<<<<< working copy: ef83787e2614 - test: revision 1
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1034
  revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1035
  space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1036
  ||||||| base
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1037
  revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1038
  space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1039
  =======
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1040
  revision 4
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 27164
diff changeset
  1041
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1042
  revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1043
  space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1044
  revision 4
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1045
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1046
  (branch merge, don't forget to commit)
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1047
  $ aftermerge
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1048
  # cat f
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 30062
diff changeset
  1049
  <<<<<<< working copy: ef83787e2614 - test: revision 1
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1050
  revision 1
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1051
  space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1052
  ||||||| base
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1053
  revision 0
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1054
  space
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1055
  =======
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1056
  revision 4
30062
940c05b25b07 merge: add conflict labels to merge command
Simon Farnsworth <simonfar@fb.com>
parents: 27164
diff changeset
  1057
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1058
  # hg stat
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1059
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1060
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1061
  R f
22032
d7f25834ffbb merge-tools: add a `premerge=keep-merge3` config option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22030
diff changeset
  1062
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1063
premerge=keep respects ui.mergemarkers=basic:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1064
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1065
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1066
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1067
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1068
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1069
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1070
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1071
  $ hg merge -r 4 --config merge-tools.true.premerge=keep --config ui.mergemarkers=basic
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1072
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1073
  <<<<<<< working copy
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1074
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1075
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1076
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1077
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1078
  >>>>>>> merge rev
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1079
  revision 0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1080
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1081
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1082
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1083
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1084
  $ aftermerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1085
  # cat f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1086
  <<<<<<< working copy
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1087
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1088
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1089
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1090
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1091
  >>>>>>> merge rev
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1092
  # hg stat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1093
  M f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1094
  # hg resolve --list
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1095
  R f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1096
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1097
premerge=keep ignores ui.mergemarkers=basic if true.mergemarkers=detailed:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1098
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1099
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1100
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1101
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1102
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1103
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1104
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1105
  $ hg merge -r 4 --config merge-tools.true.premerge=keep \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1106
  >     --config ui.mergemarkers=basic \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1107
  >     --config merge-tools.true.mergemarkers=detailed
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1108
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1109
  <<<<<<< working copy: ef83787e2614 - test: revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1110
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1111
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1112
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1113
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1114
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1115
  revision 0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1116
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1117
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1118
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1119
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1120
  $ aftermerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1121
  # cat f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1122
  <<<<<<< working copy: ef83787e2614 - test: revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1123
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1124
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1125
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1126
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1127
  >>>>>>> merge rev:    81448d39c9a0 - test: revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1128
  # hg stat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1129
  M f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1130
  # hg resolve --list
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1131
  R f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1132
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1133
premerge=keep respects ui.mergemarkertemplate instead of
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1134
true.mergemarkertemplate if true.mergemarkers=basic:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1135
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1136
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1137
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1138
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1139
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1140
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1141
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1142
  $ hg merge -r 4 --config merge-tools.true.premerge=keep \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1143
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1144
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1145
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1146
  <<<<<<< working copy: uitmpl 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1147
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1148
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1149
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1150
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1151
  >>>>>>> merge rev:    uitmpl 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1152
  revision 0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1153
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1154
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1155
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1156
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1157
  $ aftermerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1158
  # cat f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1159
  <<<<<<< working copy: uitmpl 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1160
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1161
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1162
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1163
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1164
  >>>>>>> merge rev:    uitmpl 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1165
  # hg stat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1166
  M f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1167
  # hg resolve --list
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1168
  R f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1169
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1170
premerge=keep respects true.mergemarkertemplate instead of
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1171
true.mergemarkertemplate if true.mergemarkers=detailed:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1172
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1173
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1174
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1175
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1176
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1177
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1178
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1179
  $ hg merge -r 4 --config merge-tools.true.premerge=keep \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1180
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1181
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1182
  >    --config merge-tools.true.mergemarkers=detailed
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1183
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1184
  <<<<<<< working copy: tooltmpl ef83787e2614
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1185
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1186
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1187
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1188
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1189
  >>>>>>> merge rev:    tooltmpl 81448d39c9a0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1190
  revision 0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1191
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1192
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1193
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1194
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1195
  $ aftermerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1196
  # cat f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1197
  <<<<<<< working copy: tooltmpl ef83787e2614
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1198
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1199
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1200
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1201
  revision 4
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1202
  >>>>>>> merge rev:    tooltmpl 81448d39c9a0
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1203
  # hg stat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1204
  M f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1205
  # hg resolve --list
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1206
  R f
22030
ecdff28d13e2 mergetools: add a test for premerge --keep
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22029
diff changeset
  1207
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1208
Tool execution
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
  1209
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1210
set tools.args explicit to include $base $local $other $output:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1211
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1212
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1213
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1214
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1215
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1216
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1217
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1218
  $ hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1219
  >   | sed 's,==> .* <==,==> ... <==,g'
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
  1220
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1221
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1222
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1223
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1224
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1225
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1226
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1227
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1228
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1229
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1230
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1231
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1232
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1233
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1234
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1235
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1236
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1237
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1238
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1239
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1240
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1241
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1242
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1243
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1244
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1245
  R f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1246
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1247
Merge with "echo mergeresult > $local":
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1248
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1249
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1250
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1251
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1252
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1253
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1254
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1255
  $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1256
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1257
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1258
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1259
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1260
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1261
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1262
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1263
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1264
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1265
  R f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1266
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1267
- and $local is the file f:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1268
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1269
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1270
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1271
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1272
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1273
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1274
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1275
  $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1276
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1277
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1278
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1279
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1280
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1281
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1282
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1283
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1284
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1285
  R f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1286
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1287
Merge with "echo mergeresult > $output" - the variable is a bit magic:
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
  1288
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1289
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1290
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1291
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1292
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1293
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1294
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1295
  $ hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1296
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1297
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1298
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1299
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1300
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1301
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1302
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1303
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1304
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1305
  R f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
  1306
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1307
Merge using tool with a path that must be quoted:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1308
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1309
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1310
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1311
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1312
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1313
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1314
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1315
  $ cat <<EOF > 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1316
  > cat "\$1" "\$2" "\$3" > "\$4"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1317
  > EOF
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
  1318
  $ hg --config merge-tools.true.executable='sh' \
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
  1319
  >    --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
  1320
  >    merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1321
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1322
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1323
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1324
  $ rm -f 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1325
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1326
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1327
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1328
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1329
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1330
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1331
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1332
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1333
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1334
  M f
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1335
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1336
  R f
10775
c52057614c72 Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents: 10282
diff changeset
  1337
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1338
Merge using a tool that supports labellocal, labelother, and labelbase, checking
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1339
that they're quoted properly as well. This is using the default 'basic'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1340
mergemarkers even though ui.mergemarkers is 'detailed', so it's ignoring both
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1341
mergemarkertemplate settings:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1342
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1343
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1344
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1345
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1346
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1347
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1348
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1349
  $ cat <<EOF > printargs_merge_tool
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1350
  > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1351
  > EOF
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1352
  $ hg --config merge-tools.true.executable='sh' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1353
  >    --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1354
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1355
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1356
  >    --config ui.mergemarkers=detailed \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1357
  >    merge -r 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1358
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1359
  arg: "ll:working copy"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1360
  arg: "lo:"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1361
  arg: "merge rev"
36092
fe5c4b795999 test-merge-tools: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 36031
diff changeset
  1362
  arg: "lb:base: */f~base.*" (glob)
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1363
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1364
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1365
  $ rm -f 'printargs_merge_tool'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1366
37002
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1367
Same test with experimental.mergetempdirprefix set:
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1368
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1369
  $ beforemerge
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1370
  [merge-tools]
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1371
  false.whatever=
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1372
  true.priority=1
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1373
  true.executable=cat
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1374
  # hg update -C 1
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1375
  $ cat <<EOF > printargs_merge_tool
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1376
  > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1377
  > EOF
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1378
  $ hg --config experimental.mergetempdirprefix=$TESTTMP/hgmerge. \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1379
  >    --config merge-tools.true.executable='sh' \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1380
  >    --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1381
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1382
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1383
  >    --config ui.mergemarkers=detailed \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1384
  >    merge -r 2
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1385
  merging f
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1386
  arg: "ll:working copy"
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1387
  arg: "lo:"
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1388
  arg: "merge rev"
37026
6bc2f1b3bc9d test-merge-tools: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 37002
diff changeset
  1389
  arg: "lb:base: */hgmerge.*/f~base" (glob)
37002
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1390
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1391
  (branch merge, don't forget to commit)
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1392
  $ rm -f 'printargs_merge_tool'
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1393
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1394
Merge using a tool that supports labellocal, labelother, and labelbase, checking
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1395
that they're quoted properly as well. This is using 'detailed' mergemarkers,
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1396
even though ui.mergemarkers is 'basic', and using the tool's
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1397
mergemarkertemplate:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1398
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1399
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1400
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1401
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1402
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1403
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1404
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1405
  $ cat <<EOF > printargs_merge_tool
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1406
  > while test \$# -gt 0; do echo arg: \"\$1\"; shift; done
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1407
  > EOF
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1408
  $ hg --config merge-tools.true.executable='sh' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1409
  >    --config merge-tools.true.args='./printargs_merge_tool ll:$labellocal lo: $labelother lb:$labelbase": "$base' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1410
  >    --config merge-tools.true.mergemarkers=detailed \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1411
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1412
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1413
  >    --config ui.mergemarkers=basic \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1414
  >    merge -r 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1415
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1416
  arg: "ll:working copy: tooltmpl ef83787e2614"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1417
  arg: "lo:"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1418
  arg: "merge rev: tooltmpl 0185f4e0cf02"
36092
fe5c4b795999 test-merge-tools: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 36031
diff changeset
  1419
  arg: "lb:base: */f~base.*" (glob)
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1420
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1421
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1422
  $ rm -f 'printargs_merge_tool'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1423
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1424
The merge tool still gets labellocal and labelother as 'basic' even when
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1425
premerge=keep is used and has 'detailed' markers:
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1426
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1427
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1428
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1429
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1430
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1431
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1432
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1433
  $ cat <<EOF > mytool
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1434
  > echo labellocal: \"\$1\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1435
  > echo labelother: \"\$2\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1436
  > echo "output (arg)": \"\$3\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1437
  > echo "output (contents)":
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1438
  > cat "\$3"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1439
  > EOF
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1440
  $ hg --config merge-tools.true.executable='sh' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1441
  >    --config merge-tools.true.args='mytool $labellocal $labelother $output' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1442
  >    --config merge-tools.true.premerge=keep \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1443
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1444
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1445
  >    --config ui.mergemarkers=detailed \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1446
  >    merge -r 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1447
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1448
  labellocal: "working copy"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1449
  labelother: "merge rev"
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1450
  output (arg): "$TESTTMP/repo/f"
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1451
  output (contents):
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1452
  <<<<<<< working copy: uitmpl 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1453
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1454
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1455
  revision 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1456
  >>>>>>> merge rev:    uitmpl 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1457
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1458
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1459
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1460
  $ rm -f 'mytool'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1461
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1462
premerge=keep uses the *tool's* mergemarkertemplate if tool's
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1463
mergemarkers=detailed; labellocal and labelother also use the tool's template
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1464
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1465
  $ beforemerge
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1466
  [merge-tools]
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1467
  false.whatever=
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1468
  true.priority=1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1469
  true.executable=cat
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1470
  # hg update -C 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1471
  $ cat <<EOF > mytool
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1472
  > echo labellocal: \"\$1\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1473
  > echo labelother: \"\$2\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1474
  > echo "output (arg)": \"\$3\"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1475
  > echo "output (contents)":
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1476
  > cat "\$3"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1477
  > EOF
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1478
  $ hg --config merge-tools.true.executable='sh' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1479
  >    --config merge-tools.true.args='mytool $labellocal $labelother $output' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1480
  >    --config merge-tools.true.premerge=keep \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1481
  >    --config merge-tools.true.mergemarkers=detailed \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1482
  >    --config merge-tools.true.mergemarkertemplate='tooltmpl {short(node)}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1483
  >    --config ui.mergemarkertemplate='uitmpl {rev}' \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1484
  >    --config ui.mergemarkers=detailed \
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1485
  >    merge -r 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1486
  merging f
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1487
  labellocal: "working copy: tooltmpl ef83787e2614"
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1488
  labelother: "merge rev: tooltmpl 0185f4e0cf02"
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1489
  output (arg): "$TESTTMP/repo/f"
35947
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1490
  output (contents):
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1491
  <<<<<<< working copy: tooltmpl ef83787e2614
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1492
  revision 1
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1493
  =======
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1494
  revision 2
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1495
  >>>>>>> merge rev:    tooltmpl 0185f4e0cf02
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1496
  space
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1497
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1498
  (branch merge, don't forget to commit)
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1499
  $ rm -f 'mytool'
9037c29e9f53 filemerge: support passing labels to external merge tools
Kyle Lippincott <spectral@google.com>
parents: 35704
diff changeset
  1500
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1501
Issue3581: Merging a filename that needs to be quoted
17902
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
  1502
(This test doesn't work on Windows filesystems even on Linux, so check
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
  1503
for Unix-like permission)
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1504
17902
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
  1505
#if unix-permissions
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1506
  $ beforemerge
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1507
  [merge-tools]
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1508
  false.whatever=
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1509
  true.priority=1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1510
  true.executable=cat
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1511
  # hg update -C 1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1512
  $ echo "revision 5" > '"; exit 1; echo "'
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1513
  $ hg commit -Am "revision 5"
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1514
  adding "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1515
  warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1516
  $ hg update -C 1 > /dev/null
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1517
  $ echo "revision 6" > '"; exit 1; echo "'
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1518
  $ hg commit -Am "revision 6"
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1519
  adding "; exit 1; echo "
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1520
  warning: filename contains '"', which is reserved on Windows: '"; exit 1; echo "'
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1521
  created new head
22029
f28329171a86 test-merge-tools: introduce a "revision 4" that merges with conflict
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21693
diff changeset
  1522
  $ hg merge --config merge-tools.true.executable="true" -r 5
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1523
  merging "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1524
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1525
  (branch merge, don't forget to commit)
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1526
  $ hg update -C 1 > /dev/null
17901
a19046744e4e filemerge: only run test for issue3581 on non-windows environments
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17885
diff changeset
  1527
#endif
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
  1528
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1529
Merge post-processing
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
  1530
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1531
cat is a bad merge-tool and doesn't change:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
  1532
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
  1533
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1534
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1535
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1536
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1537
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1538
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
  1539
  $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
  1540
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1541
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1542
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1543
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1544
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1545
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1546
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1547
   output file f appears unchanged
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1548
  was merge successful (yn)? n
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1549
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1550
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
  1551
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
  1552
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
  1553
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1554
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1555
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1556
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1557
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1558
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
  1559
  ? f.orig
26897
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1560
  # hg resolve --list
da1c706c9a35 test-merge-tools.t: add 'hg resolve --list' output to tests
Siddharth Agarwal <sid0@fb.com>
parents: 26730
diff changeset
  1561
  U f
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1562
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1563
#if symlink
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1564
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1565
internal merge cannot handle symlinks and shouldn't try:
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1566
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1567
  $ hg update -q -C 1
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1568
  $ rm f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1569
  $ ln -s symlink f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1570
  $ hg commit -qm 'f is symlink'
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1571
  $ hg merge -r 2 --tool internal:merge
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1572
  merging f
22707
38e0363dcbe0 filemerge: switch the default name for internal tools from internal:x to :x
Mads Kiilerich <madski@unity3d.com>
parents: 22706
diff changeset
  1573
  warning: internal :merge cannot merge symlinks for f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26611
diff changeset
  1574
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1575
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32296
diff changeset
  1576
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1577
  [1]
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1578
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
  1579
#endif
30547
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1580
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1581
Verify naming of temporary files and that extension is preserved:
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1582
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1583
  $ hg update -q -C 1
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1584
  $ hg mv f f.txt
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1585
  $ hg ci -qm "f.txt"
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1586
  $ hg update -q -C 2
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1587
  $ hg merge -y -r tip --tool echo --config merge-tools.echo.args='$base $local $other $output'
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1588
  merging f and f.txt to f.txt
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1589
  */f~base.* */f~local.*.txt */f~other.*.txt $TESTTMP/repo/f.txt (glob)
30547
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1590
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
c2154979409d merge: use original file extension for temporary files
Mads Kiilerich <madski@unity3d.com>
parents: 30469
diff changeset
  1591
  (branch merge, don't forget to commit)
32296
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1592
37002
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1593
Verify naming of temporary files and that extension is preserved
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1594
(experimental.mergetempdirprefix version):
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1595
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1596
  $ hg update -q -C 1
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1597
  $ hg mv f f.txt
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1598
  $ hg ci -qm "f.txt"
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1599
  $ hg update -q -C 2
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1600
  $ hg merge -y -r tip --tool echo \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1601
  >    --config merge-tools.echo.args='$base $local $other $output' \
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1602
  >    --config experimental.mergetempdirprefix=$TESTTMP/hgmerge.
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1603
  merging f and f.txt to f.txt
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1604
  $TESTTMP/hgmerge.*/f~base $TESTTMP/hgmerge.*/f~local.txt $TESTTMP/hgmerge.*/f~other.txt $TESTTMP/repo/f.txt (glob)
37002
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1605
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1606
  (branch merge, don't forget to commit)
e349ad5cbb71 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com>
parents: 36995
diff changeset
  1607
32296
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1608
Check that debugpicktool examines which merge tool is chosen for
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1609
specified file as expected
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1610
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1611
  $ beforemerge
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1612
  [merge-tools]
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1613
  false.whatever=
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1614
  true.priority=1
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1615
  true.executable=cat
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1616
  # hg update -C 1
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1617
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1618
(default behavior: checking files in the working parent context)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1619
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1620
  $ hg manifest
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1621
  f
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1622
  $ hg debugpickmergetool
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1623
  f = true
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1624
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1625
(-X/-I and file patterns limmit examination targets)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1626
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1627
  $ hg debugpickmergetool -X f
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1628
  $ hg debugpickmergetool unknown
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1629
  unknown: no such file in rev ef83787e2614
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1630
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1631
(--changedelete emulates merging change and delete)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1632
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1633
  $ hg debugpickmergetool --changedelete
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1634
  f = :prompt
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1635
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1636
(-r REV causes checking files in specified revision)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1637
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1638
  $ hg manifest -r tip
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1639
  f.txt
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1640
  $ hg debugpickmergetool -r tip
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1641
  f.txt = true
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1642
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1643
#if symlink
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1644
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1645
(symlink causes chosing :prompt)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1646
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1647
  $ hg debugpickmergetool -r 6d00b3726f6e
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1648
  f = :prompt
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1649
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1650
#endif
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1651
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1652
(--verbose shows some configurations)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1653
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1654
  $ hg debugpickmergetool --tool foobar -v
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1655
  with --tool 'foobar'
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1656
  f = foobar
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1657
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1658
  $ HGMERGE=false hg debugpickmergetool -v
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1659
  with HGMERGE='false'
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1660
  f = false
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1661
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1662
  $ hg debugpickmergetool --config ui.merge=false -v
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1663
  with ui.merge='false'
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1664
  f = false
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1665
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1666
(--debug shows errors detected intermediately)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1667
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1668
  $ hg debugpickmergetool --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool --debug f
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1669
  couldn't find merge tool true (for pattern f)
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1670
  couldn't find merge tool true
9bc36198338e debugcommands: add debugpickmergetool to examine which merge tool is chosen
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32295
diff changeset
  1671
  f = false
38071
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1672
a4a5c3085ea9 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org>
parents: 37080
diff changeset
  1673
  $ cd ..