tests/test-merge-tools.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Mon, 04 Aug 2014 16:39:47 -0700
changeset 22029 f28329171a86
parent 21693 9c35f3a8cac4
child 22030 ecdff28d13e2
permissions -rw-r--r--
test-merge-tools: introduce a "revision 4" that merges with conflict We need conflicts to test the premerge=keep configuration.
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
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     4
  $ hg init
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     5
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     6
revision 0
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
     7
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     8
  $ echo "revision 0" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     9
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    10
  $ hg commit -Am "revision 0"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    11
  adding f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    12
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    13
revision 1
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    14
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    15
  $ echo "revision 1" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    16
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    17
  $ hg commit -Am "revision 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    18
  $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    19
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    20
revision 2
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    21
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    22
  $ echo "revision 2" > f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    23
  $ echo "space" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    24
  $ hg commit -Am "revision 2"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    25
  created new head
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    26
  $ hg update 0 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    27
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    28
revision 3 - simple to merge
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    29
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    30
  $ echo "revision 3" >> f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    31
  $ hg commit -Am "revision 3"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    32
  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
    33
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
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
    35
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
  $ 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
    37
  $ 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
    38
  $ 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
    39
  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
    40
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    41
  $ 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
    42
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    43
  $ beforemerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    44
  >   cat .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    45
  >   echo "# hg update -C 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    46
  >   hg update -C 1 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    47
  > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    48
  $ aftermerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    49
  >   echo "# cat f"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    50
  >   cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    51
  >   echo "# hg stat"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    52
  >   hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    53
  >   rm -f f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    54
  > }
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    55
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    56
Tool selection
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    57
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    58
default is internal merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    59
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    60
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    61
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    62
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    63
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    64
hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    65
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
    66
running from a devel copy, not a temp installation
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    67
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    68
  $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    69
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    70
  warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15264
diff changeset
    71
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    72
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    73
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    74
  [1]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    75
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    76
  # cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21552
diff changeset
    77
  <<<<<<< local: ef83787e2614  - test: revision 1
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    78
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    79
  =======
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    80
  revision 2
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21552
diff changeset
    81
  >>>>>>> other: 0185f4e0cf02  - test: revision 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    82
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    83
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    84
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    85
  ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    86
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    87
simplest hgrc using false for merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    88
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    89
  $ echo "false.whatever=" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
    90
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    91
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    92
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    93
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
    94
  $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    96
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    97
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    98
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
    99
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   100
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   101
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   102
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   103
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   104
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   105
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   106
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   107
15545
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   108
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
   109
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   110
  $ touch false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   111
  $ hg up -qC 1
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   112
  $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   113
  merging f
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   114
  warning: conflicts during merge.
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   115
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   116
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   117
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   118
  [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   119
  $ rm false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   120
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   121
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
   122
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   123
  $ mkdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   124
  $ hg up -qC 1
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   125
  $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   126
  merging f
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   127
  warning: conflicts during merge.
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   128
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   129
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   130
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   131
  [1]
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   132
  $ rmdir false
2607de602105 tests: test findexe() access check fixed in 58f96703a9ab
Mads Kiilerich <mads@kiilerich.com>
parents: 15524
diff changeset
   133
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   134
true with higher .priority gets precedence:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   135
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   136
  $ echo "true.priority=1" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   137
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   138
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   139
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   140
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   141
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   142
  $ hg merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   143
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   144
  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
   145
  (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
   146
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   147
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   148
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   149
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   150
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   151
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   152
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   153
unless lowered on command line:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   154
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   155
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   156
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   157
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   158
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   159
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   160
  $ 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
   161
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   162
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   163
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   164
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   165
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   166
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   167
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   168
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   169
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   170
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   171
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   172
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   173
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   174
or false set higher on command line:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   175
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   176
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   177
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   178
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   179
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   180
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   181
  $ 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
   182
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   183
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   184
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   185
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   186
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   187
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   188
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   189
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   190
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   191
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   192
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   193
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   194
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   195
or true.executable not found in PATH:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   196
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   197
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   198
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   199
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   200
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   201
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   202
  $ 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
   203
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   204
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   205
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   206
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   207
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   208
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   209
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   210
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   211
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   212
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   213
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   214
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   215
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   216
or true.executable with bogus path:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   217
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   218
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   219
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   220
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   221
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   222
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   223
  $ 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
   224
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   225
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   226
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   227
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   228
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   229
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   230
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   231
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   232
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   233
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   234
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   235
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   236
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   237
but true.executable set to cat found in PATH works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   238
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   239
  $ echo "true.executable=cat" >> .hg/hgrc
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   240
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   241
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   242
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   243
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   244
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   245
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   246
  $ hg merge -r 2
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
   247
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   248
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   249
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   250
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   251
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   252
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   253
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   254
  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
   255
  (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
   256
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   257
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   258
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   259
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   260
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   261
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   262
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   263
and true.executable set to cat with path works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   264
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   265
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   266
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   267
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   268
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   269
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   270
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   271
  $ 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
   272
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   273
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   274
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   275
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   276
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   277
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   278
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   279
  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
   280
  (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
   281
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   282
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   283
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   284
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   285
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   286
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   287
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   288
#if unix-permissions
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   289
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   290
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
   291
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
   292
  $ 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
   293
  $ beforemerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   294
  [merge-tools]
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   295
  false.whatever=
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   296
  true.priority=1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   297
  true.executable=cat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   298
  # hg update -C 1
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
   299
  $ hg --config merge-tools.true.executable='sh' \
19264
eac114e13b96 tests: avoid writing files to HGTMP
Matt Mackall <mpm@selenic.com>
parents: 18325
diff changeset
   300
  >    --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
   301
  >    merge -r 2
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   302
  merging f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   303
  custom merge tool
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   304
  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
   305
  (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
   306
  $ aftermerge
15264
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   307
  # cat f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   308
  revision 1
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   309
  space
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   310
  # hg stat
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   311
  M f
157d93c41c10 merge: expand environment variables and ~/ in tool.executable
Greg Ward <greg@gerg.ca>
parents: 15243
diff changeset
   312
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   313
#endif
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16967
diff changeset
   314
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   315
Tool selection and merge-patterns
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   316
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   317
merge-patterns specifies new tool false:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   318
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   319
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   320
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   321
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   322
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   323
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   324
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   325
  $ 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
   326
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   327
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   328
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   329
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   330
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   331
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   332
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   333
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   334
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   335
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   336
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   337
  ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   338
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   339
merge-patterns specifies executable not found in PATH and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   340
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   341
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   342
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   343
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   344
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   345
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   346
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   347
  $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistentmergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   348
  couldn't find merge tool true specified for f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   349
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   350
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   351
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   352
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   353
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   354
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   355
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   356
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   357
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   358
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   359
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   360
  ? f.orig
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   361
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   362
merge-patterns specifies executable with bogus path and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   363
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   364
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   365
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   366
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   367
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   368
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   369
  # hg update -C 1
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 16972
diff changeset
   370
  $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexistent/mergetool
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   371
  couldn't find merge tool true specified for f
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
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   375
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   384
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   385
ui.merge overrules priority
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
ui.merge specifies false:
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
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   395
  $ hg merge -r 2 --config ui.merge=false
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   396
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   397
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   398
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   399
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   400
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   401
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   402
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   403
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   404
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   405
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   406
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   407
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   408
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   409
ui.merge specifies internal:fail:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   410
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   411
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   412
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   413
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   414
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   415
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   416
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   417
  $ 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
   418
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   419
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   420
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   421
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   422
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   423
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   424
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   425
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   426
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   427
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   428
ui.merge specifies internal:local:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   429
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   430
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   431
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   432
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   433
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   434
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   435
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   436
  $ hg merge -r 2 --config ui.merge=internal:local
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   437
  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
   438
  (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
   439
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   440
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   441
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   442
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   443
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   444
  M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   445
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   446
ui.merge specifies internal:other:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   447
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   448
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   449
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   450
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   451
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   452
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   453
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   454
  $ 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
   455
  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
   456
  (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
   457
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   458
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   459
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   460
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   461
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   462
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   463
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   464
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
   465
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   466
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   467
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   468
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   469
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   470
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   471
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   472
  $ hg merge -r 2 --config ui.merge=internal:prompt
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   473
   no tool found to merge f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   474
  keep (l)ocal or take (o)ther? l
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   475
  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
   476
  (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
   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
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   483
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   484
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
   485
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   486
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   487
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   488
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   489
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   490
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   491
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   492
  $ 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
   493
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   494
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   495
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   496
  [1]
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
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   503
  ? f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   504
  ? f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   505
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   506
  ? f.other
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   507
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   508
f.base:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   509
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   510
  $ cat f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   511
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   512
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   513
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   514
f.local:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   515
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   516
  $ cat f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   517
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   518
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   519
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   520
f.other:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   521
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   522
  $ cat f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   523
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   524
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   525
  $ rm f.base f.local f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   526
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   527
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
   528
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   529
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   530
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   531
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   532
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   533
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   534
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   535
  $ 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
   536
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   537
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   538
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   539
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   540
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   541
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   542
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   543
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   544
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   545
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   546
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   547
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   548
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   549
Premerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   550
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   551
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
   552
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   553
  $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   554
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   555
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   556
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   557
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   558
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   559
  $ 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
   560
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   561
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   562
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   563
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   564
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   565
  $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   566
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   567
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   568
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   569
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   570
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   571
  ? f.orig
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   572
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   573
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
   574
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   575
  $ HGMERGE=internal:other ; export HGMERGE
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   576
  $ beforemerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   577
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   578
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   579
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   580
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   581
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   582
  $ 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
   583
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   584
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   585
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   586
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   587
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   588
  $ aftermerge
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   589
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   590
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   591
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   592
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   593
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   594
  ? f.orig
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   595
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   596
  $ 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
   597
21552
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   598
update is a merge ...
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   599
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   600
  $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   601
  [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   602
  false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   603
  true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   604
  true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   605
  # hg update -C 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   606
  $ hg debugsetparent 0
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   607
  $ hg update -r 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   608
  merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   609
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   610
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   611
  revision 0
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   612
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   613
  revision 2
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   614
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   615
  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
   616
  $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   617
  # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   618
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   619
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   620
  # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   621
  M f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   622
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   623
update should also have --tool
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   624
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   625
  $ beforemerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   626
  [merge-tools]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   627
  false.whatever=
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   628
  true.priority=1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   629
  true.executable=cat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   630
  # hg update -C 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   631
  $ hg debugsetparent 0
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   632
  $ hg update -r 2 --tool false
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   633
  merging f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   634
  merging f failed!
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   635
  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
   636
  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
   637
  [1]
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   638
  $ aftermerge
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   639
  # cat f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   640
  revision 1
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   641
  space
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   642
  # hg stat
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   643
  M f
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   644
  ? f.orig
61151f429a5f update: introduce --tool for controlling the merge tool
Mads Kiilerich <madski@unity3d.com>
parents: 21519
diff changeset
   645
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   646
Default is silent simplemerge:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
   647
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   648
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   649
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   650
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   651
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   652
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   653
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   654
  $ hg merge -r 3
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   655
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   656
  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
   657
  (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
   658
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   659
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   660
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   661
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   662
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   663
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   664
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   665
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   666
.premerge=True is same:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   667
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   668
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   669
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   670
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   671
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   672
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   673
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   674
  $ 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
   675
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   676
  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
   677
  (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
   678
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   679
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   680
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   681
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   682
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   683
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   684
  M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   685
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   686
.premerge=False executes merge-tool:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   687
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   688
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   689
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   690
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   691
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   692
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   693
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   694
  $ 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
   695
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   696
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   697
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   698
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   699
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   700
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   701
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   702
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   703
  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
   704
  (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
   705
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   706
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   707
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   708
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   709
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   710
  M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   711
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   712
Tool execution
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   713
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   714
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
   715
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   716
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   717
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   718
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   719
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   720
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   721
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   722
  $ 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
   723
  >   | sed 's,==> .* <==,==> ... <==,g'
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12788
diff changeset
   724
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   725
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   726
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   727
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   728
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   729
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   730
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   731
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   732
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   733
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   734
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   735
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   736
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   737
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   738
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   739
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   740
  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
   741
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   742
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   743
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   744
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   745
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   746
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   747
  M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   748
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   749
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
   750
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   751
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   752
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   753
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   754
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   755
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   756
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   757
  $ 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
   758
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   759
  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
   760
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   761
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   762
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   763
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   764
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   765
  M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   766
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   767
- 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
   768
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   769
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   770
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   771
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   772
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   773
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   774
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   775
  $ 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
   776
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   777
  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
   778
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   779
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   780
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   781
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   782
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   783
  M f
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   784
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   785
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
   786
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   787
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   788
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   789
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   790
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   791
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   792
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   793
  $ 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
   794
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   795
  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
   796
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   797
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   798
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   799
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   800
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   801
  M f
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   802
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   803
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
   804
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   805
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   806
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   807
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   808
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   809
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   810
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   811
  $ cat <<EOF > 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   812
  > cat "\$1" "\$2" "\$3" > "\$4"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   813
  > EOF
16967
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
   814
  $ hg --config merge-tools.true.executable='sh' \
30cfa286947c test-merge-tools: adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16961
diff changeset
   815
  >    --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
   816
  >    merge -r 2
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   817
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   818
  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
   819
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   820
  $ rm -f 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   821
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   822
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   823
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   824
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   825
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   826
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   827
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   828
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   829
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   830
  M f
10775
c52057614c72 Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents: 10282
diff changeset
   831
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   832
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
   833
(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
   834
for Unix-like permission)
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   835
17902
195ad823b5d5 tests: fix test for issue3581 for vfat on Linux
Matt Mackall <mpm@selenic.com>
parents: 17901
diff changeset
   836
#if unix-permissions
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   837
  $ beforemerge
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   838
  [merge-tools]
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   839
  false.whatever=
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   840
  true.priority=1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   841
  true.executable=cat
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   842
  # hg update -C 1
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   843
  $ 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
   844
  $ hg commit -Am "revision 5"
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   845
  adding "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   846
  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
   847
  $ 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
   848
  $ 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
   849
  $ 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
   850
  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
   851
  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
   852
  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
   853
  $ 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
   854
  merging "; exit 1; echo "
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   855
  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
   856
  (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
   857
  $ 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
   858
#endif
17885
9a2cf955db84 filemerge: use util.shellquote when calling merge (issue3581)
Keegan Carruthers-Smith <keegancsmith@fb.com>
parents: 17492
diff changeset
   859
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   860
Merge post-processing
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   861
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   862
cat is a bad merge-tool and doesn't change:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   863
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   864
  $ beforemerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   865
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   866
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   867
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   868
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   869
  # hg update -C 1
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   870
  $ 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
   871
  merging f
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   872
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   873
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   874
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   875
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   876
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   877
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   878
   output file f appears unchanged
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   879
  was merge successful (yn)? n
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   880
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   881
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   882
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
16961
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   883
  [1]
cdbb53a640c1 test-merge-tools: inline pointless domerge function
Adrian Buehlmann <adrian@cadifra.com>
parents: 15545
diff changeset
   884
  $ aftermerge
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   885
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   886
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   887
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   888
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   889
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   890
  ? f.orig
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   891
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   892
#if symlink
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   893
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   894
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
   895
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   896
  $ hg update -q -C 1
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   897
  $ rm f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   898
  $ ln -s symlink f
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   899
  $ hg commit -qm 'f is symlink'
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   900
  $ 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
   901
  merging f
18325
297bf69966a0 merge: warn when internal:merge cannot merge symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 18256
diff changeset
   902
  warning: internal:merge cannot merge symlinks for f
18256
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   903
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   904
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   905
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   906
  [1]
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   907
d084df89d948 merge: make internal merge fail cleanly on symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 17902
diff changeset
   908
#endif