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