tests/test-merge-tools.t
author Martin Geisler <mg@lazybytes.net>
Sat, 23 Oct 2010 17:30:08 +0200
branchstable
changeset 12819 5082e2f3f8e0
parent 12788 de793925862e
child 13439 d724a69309e0
permissions -rw-r--r--
minirst: ignore comments
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
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    34
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    35
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    36
  $ beforemerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    37
  >   cat .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    38
  >   echo "# hg update -C 1"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    39
  >   hg update -C 1 > /dev/null
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    40
  > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    41
  $ aftermerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    42
  >   echo "# cat f"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    43
  >   cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    44
  >   echo "# hg stat"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    45
  >   hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    46
  >   rm -f f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    47
  >   echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    48
  > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    49
  $ domerge() {
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    50
  >   beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    51
  >   echo "# hg merge $*"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    52
  >   hg merge $*
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    53
  >   aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    54
  > }
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    55
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    56
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    57
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    58
Tool selection
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    59
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    60
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    61
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    62
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    63
default is internal merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    64
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    65
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    66
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    67
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    68
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    69
hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    70
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
    71
running from a devel copy, not a temp installation
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    72
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    73
  $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    74
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    75
  warning: conflicts during merge.
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    76
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    77
  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
    78
  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
    79
  [1]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    80
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    81
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    82
  <<<<<<< local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    83
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    84
  =======
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    85
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    86
  >>>>>>> other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    87
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    88
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    89
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    90
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    91
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    92
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    93
simplest hgrc using false for merge:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
    94
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  $ echo "false.whatever=" >> .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    96
  $ domerge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    97
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    98
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    99
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   100
  # hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   101
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   102
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   103
  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
   104
  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
   105
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   106
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   107
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   108
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   109
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   110
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   111
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   112
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   113
true with higher .priority gets precedence:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   114
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   115
  $ echo "true.priority=1" >> .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   116
  $ domerge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   117
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   118
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   119
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   120
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   121
  # hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   122
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   123
  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
   124
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   125
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   126
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   127
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   128
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   129
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   130
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   131
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   132
unless lowered on command line:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   133
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   134
  $ domerge -r 2 --config merge-tools.true.priority=-7
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   135
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   136
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   137
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   138
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   139
  # hg merge -r 2 --config merge-tools.true.priority=-7
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   140
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   141
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   142
  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
   143
  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
   144
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   145
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   146
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   147
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   148
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   149
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   150
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   151
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   152
or false set higher on command line:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   153
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   154
  $ domerge -r 2 --config merge-tools.false.priority=117
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   155
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   156
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   157
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   158
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   159
  # hg merge -r 2 --config merge-tools.false.priority=117
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   160
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   161
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   162
  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
   163
  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
   164
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   165
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   166
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   167
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   168
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   169
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   170
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   171
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   172
or true.executable not found in PATH:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   173
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   174
  $ domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   175
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   176
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   177
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   178
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   179
  # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   180
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   181
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   182
  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
   183
  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
   184
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   185
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   186
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   187
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   188
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   189
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   190
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   191
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   192
or true.executable with bogus path:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   193
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   194
  $ domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   195
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   196
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   197
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   198
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   199
  # hg merge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   200
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   201
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   202
  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
   203
  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
   204
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   205
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   206
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   207
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   208
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   209
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   210
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   211
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   212
but true.executable set to cat found in PATH works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   213
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   214
  $ echo "true.executable=cat" >> .hg/hgrc
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   215
  $ domerge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   216
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   217
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   218
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   219
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   220
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   221
  # hg merge -r 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   222
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   223
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   224
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   225
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   226
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   227
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   228
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   229
  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
   230
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   231
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   232
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   233
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   234
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   235
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   236
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   237
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   238
and true.executable set to cat with path works:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   239
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   240
  $ domerge -r 2 --config merge-tools.true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   241
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   242
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   243
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   244
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   245
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   246
  # hg merge -r 2 --config merge-tools.true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   247
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   248
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   249
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   250
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   251
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   252
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   253
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   254
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   255
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   256
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   257
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   258
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   259
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   260
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   261
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   262
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   263
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   264
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   265
Tool selection and merge-patterns
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   266
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   267
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   268
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   269
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   270
merge-patterns specifies new tool false:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   271
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   272
  $ domerge -r 2 --config merge-patterns.f=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   273
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   274
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   275
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   276
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   277
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   278
  # hg merge -r 2 --config merge-patterns.f=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   279
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   280
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   281
  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
   282
  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
   283
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   284
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   285
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   286
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   287
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   288
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   289
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   290
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   291
merge-patterns specifies executable not found in PATH and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   292
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   293
  $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   294
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   295
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   296
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   297
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   298
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   299
  # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   300
  couldn't find merge tool true specified for f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   301
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   302
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   303
  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
   304
  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
   305
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   306
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   307
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   308
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   309
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   310
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   311
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   312
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   313
merge-patterns specifies executable with bogus path and gets warning:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   314
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   315
  $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   316
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   317
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   318
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   319
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   320
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   321
  # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   322
  couldn't find merge tool true specified for f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   323
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   324
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   325
  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
   326
  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
   327
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   328
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   329
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   330
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   331
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   332
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   333
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   334
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   335
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   336
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   337
ui.merge overrules priority
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   338
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   339
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   340
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   341
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   342
ui.merge specifies false:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   343
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   344
  $ domerge -r 2 --config ui.merge=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   345
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   346
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   347
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   348
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   349
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   350
  # hg merge -r 2 --config ui.merge=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   351
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   352
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   353
  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
   354
  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
   355
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   356
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   357
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   358
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   359
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   360
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   361
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   362
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   363
ui.merge specifies internal:fail:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   364
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   365
  $ domerge -r 2 --config ui.merge=internal:fail
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   366
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   367
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   368
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   369
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   370
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   371
  # hg merge -r 2 --config ui.merge=internal:fail
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   372
  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
   373
  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
   374
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   375
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   376
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   377
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   378
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   379
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   380
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   381
ui.merge specifies internal:local:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   382
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   383
  $ domerge -r 2 --config ui.merge=internal:local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   384
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   385
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   386
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   387
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   388
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   389
  # hg merge -r 2 --config ui.merge=internal:local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   390
  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
   391
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   392
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   393
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   394
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   395
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   396
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   397
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   398
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   399
ui.merge specifies internal:other:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   400
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   401
  $ domerge -r 2 --config ui.merge=internal:other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   402
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   403
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   404
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   405
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   406
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   407
  # hg merge -r 2 --config ui.merge=internal:other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   408
  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
   409
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   410
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   411
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   412
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   413
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   414
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   415
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   416
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   417
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
   418
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   419
  $ domerge -r 2 --config ui.merge=internal:prompt
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   420
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   421
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   422
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   423
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   424
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   425
  # hg merge -r 2 --config ui.merge=internal:prompt
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   426
   no tool found to merge f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   427
  keep (l)ocal or take (o)ther? l
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   428
  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
   429
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   430
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   431
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   432
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   433
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   434
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   435
  
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   436
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   437
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
   438
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   439
  $ domerge -r 2 --config ui.merge=internal:dump
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   440
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   441
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   442
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   443
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   444
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   445
  # hg merge -r 2 --config ui.merge=internal:dump
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   446
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   447
  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
   448
  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
   449
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   450
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   451
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   452
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   453
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   454
  ? f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   455
  ? f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   456
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   457
  ? f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   458
  
7846
1cb6836946be test-merge-tools: test ui.merge functionality and selection of internal tools
Mads Kiilerich <mads@kiilerich.com>
parents: 7785
diff changeset
   459
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   460
f.base:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   461
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   462
  $ cat f.base
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   463
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   464
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   465
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   466
f.local:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   467
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   468
  $ cat f.local
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   469
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   470
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   471
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   472
f.other:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   473
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   474
  $ cat f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   475
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   476
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   477
  $ rm f.base f.local f.other
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   478
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   479
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   480
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   481
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
   482
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   483
  $ domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   484
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   485
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   486
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   487
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   488
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   489
  # hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   490
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   491
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   492
  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
   493
  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
   494
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   495
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   496
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   497
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   498
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   499
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   500
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   501
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   502
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   503
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   504
Premerge
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
  $ echo
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
12788
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   509
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
   510
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   511
  $ domerge -r 2 --config ui.merge=internal:other --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   512
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   513
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   514
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   515
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   516
  # hg update -C 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   517
  # hg merge -r 2 --config ui.merge=internal:other --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   518
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   519
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   520
  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
   521
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   522
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   523
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   524
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   525
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   526
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   527
  ? f.orig
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   528
  
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   529
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
   530
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   531
  $ HGMERGE=internal:other ; export HGMERGE
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   532
  $ domerge -r 2 --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   533
  [merge-tools]
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   534
  false.whatever=
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   535
  true.priority=1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   536
  true.executable=cat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   537
  # hg update -C 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   538
  # hg merge -r 2 --tool=false
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   539
  merging f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   540
  merging f failed!
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   541
  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
   542
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   543
  # cat f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   544
  revision 1
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   545
  space
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   546
  # hg stat
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   547
  M f
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   548
  ? f.orig
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   549
  
de793925862e merge: implement --tool arguments using new ui.forcemerge configurable
Steve Borho <steve@borho.org>
parents: 12460
diff changeset
   550
  $ 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
   551
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   552
Default is silent simplemerge:
8901
94319ae527cf test merge-tools internal:dump and internal:prompt
Mads Kiilerich <mads@kiilerich.com>
parents: 8674
diff changeset
   553
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   554
  $ domerge -r 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   555
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   556
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   557
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   558
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   559
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   560
  # hg merge -r 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   561
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   562
  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
   563
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   564
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   565
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   566
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   567
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   568
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   569
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   570
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   571
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   572
.premerge=True is same:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   573
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   574
  $ domerge -r 3 --config merge-tools.true.premerge=True
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   575
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   576
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   577
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   578
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   579
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   580
  # hg merge -r 3 --config merge-tools.true.premerge=True
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   581
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   582
  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
   583
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   584
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   585
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   586
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   587
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   588
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   589
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   590
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   591
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   592
.premerge=False executes merge-tool:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   593
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   594
  $ domerge -r 3 --config merge-tools.true.premerge=False
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   595
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   596
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   597
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   598
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   599
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   600
  # hg merge -r 3 --config merge-tools.true.premerge=False
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   601
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   602
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   603
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   604
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   605
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   606
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   607
  revision 3
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   608
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   609
  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
   610
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   611
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   612
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   613
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   614
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   615
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   616
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   617
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   618
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   619
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   620
Tool execution
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   621
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   622
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   623
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   624
  $ echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   625
  # set tools.args explicit to include $base $local $other $output:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   626
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   627
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   628
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   629
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   630
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   631
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   632
  $ 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
   633
  >   | sed 's,==> .* <==,==> ... <==,g'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   634
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   635
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   636
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   637
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   638
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   639
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   640
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   641
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   642
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   643
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   644
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   645
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   646
  ==> ... <==
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   647
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   648
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   649
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   650
  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
   651
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   652
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   653
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   654
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   655
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   656
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   657
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   658
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   659
  $ echo '# Merge with "echo mergeresult > $local":'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   660
  # Merge with "echo mergeresult > $local":
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   661
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   662
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   663
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   664
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   665
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   666
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   667
  $ 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
   668
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   669
  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
   670
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   671
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   672
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   673
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   674
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   675
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   676
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   677
  $ echo '# - and $local is the file f:'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   678
  # - and $local is the file f:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   679
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   680
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   681
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   682
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   683
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   684
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   685
  $ 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
   686
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   687
  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
   688
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   689
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   690
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   691
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   692
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   693
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   694
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   695
  $ echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   696
  # Merge with "echo mergeresult > $output" - the variable is a bit magic:
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   697
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   698
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   699
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   700
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   701
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   702
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   703
  $ 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
   704
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   705
  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
   706
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   707
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   708
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   709
  mergeresult
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   710
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   711
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   712
  
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   713
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   714
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
   715
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   716
  $ beforemerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   717
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   718
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   719
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   720
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   721
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   722
  $ cat <<EOF > 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   723
  > #!/bin/sh
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   724
  > cat "\$1" "\$2" "\$3" > "\$4"
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   725
  > EOF
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   726
  $ chmod +x 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   727
  $ hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   728
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   729
  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
   730
  (branch merge, don't forget to commit)
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   731
  $ rm -f 'my merge tool'
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   732
  $ aftermerge
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   733
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   734
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   735
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   736
  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
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   739
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   740
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   741
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   742
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   743
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   744
  
10775
c52057614c72 Tests with spaces in paths
Mads Kiilerich <mads@kiilerich.com>
parents: 10282
diff changeset
   745
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   746
Merge post-processing
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   747
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   748
  $ echo
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   749
  
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   750
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   751
cat is a bad merge-tool and doesn't change:
7731
737f274d1915 test-merge-tools
Mads Kiilerich <mads@kiilerich.com>
parents:
diff changeset
   752
12460
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   753
  $ domerge -y -r 2 --config merge-tools.true.checkchanged=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   754
  [merge-tools]
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   755
  false.whatever=
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   756
  true.priority=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   757
  true.executable=cat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   758
  # hg update -C 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   759
  # hg merge -y -r 2 --config merge-tools.true.checkchanged=1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   760
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   761
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   762
  revision 0
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   763
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   764
  revision 2
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   765
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   766
  merging f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   767
   output file f appears unchanged
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   768
  was merge successful (yn)? n
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   769
  merging f failed!
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   770
  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
   771
  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
   772
  # cat f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   773
  revision 1
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   774
  space
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   775
  # hg stat
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   776
  M f
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   777
  ? f.orig
09168638b313 tests: unify test-merge-tools
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   778