tests/test-conflict.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Mon, 26 May 2014 11:44:58 -0700
changeset 21693 9c35f3a8cac4
parent 21519 25d5a9ecbb85
child 21864 755bf1bbe0a9
permissions -rw-r--r--
merge: drop the quotes around commit description We already have a ":" after the user name to denote the start of the description. The current usage of quotes around the description is problematic as the truncation to 80 chars is likely to drop the closing quote. This may confuse syntax coloration in some editors.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     1
  $ hg init
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     2
  $ echo "nothing" > a
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     3
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11797
diff changeset
     4
  $ hg commit -m ancestor
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     5
  $ echo "something" > a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11797
diff changeset
     6
  $ hg commit -m branch1
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     7
  $ hg co 0
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     8
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
     9
  $ echo "something else" > a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11797
diff changeset
    10
  $ hg commit -m branch2
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    11
  created new head
346
f69a5d2d4fe1 merge3: fix argument order
mpm@selenic.com
parents:
diff changeset
    12
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    13
  $ hg merge 1
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    14
  merging a
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    15
  warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    16
  merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    17
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12314
f2daa6ab514a merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents: 12156
diff changeset
    18
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
    19
  [1]
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    20
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    21
  $ hg id
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11797
diff changeset
    22
  32e80765d7fe+75234512624c+ tip
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    23
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    24
  $ cat a
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21519
diff changeset
    25
  <<<<<<< local: 32e80765d7fe - test: branch2
21519
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    26
  something else
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    27
  =======
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    28
  something
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21519
diff changeset
    29
  >>>>>>> other: 75234512624c  - test: branch1
21519
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    30
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    31
  $ hg status
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    32
  M a
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    33
  ? a.orig
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    34
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    35
Verify custom conflict markers
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    36
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    37
  $ hg up -q --clean .
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    38
  $ printf "\n[ui]\nmergemarkertemplate={author} {rev}\n" >> .hg/hgrc
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    39
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    40
  $ hg merge 1
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    41
  merging a
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    42
  warning: conflicts during merge.
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    43
  merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    44
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    45
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    46
  [1]
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    47
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    48
  $ cat a
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    49
  <<<<<<< local: test 2
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    50
  something else
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    51
  =======
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    52
  something
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    53
  >>>>>>> other: test 1
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    54
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    55
Verify basic conflict markers
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    56
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    57
  $ hg up -q --clean .
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    58
  $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    59
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    60
  $ hg merge 1
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    61
  merging a
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    62
  warning: conflicts during merge.
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    63
  merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    64
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    65
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    66
  [1]
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    67
25d5a9ecbb85 merge: add conflict marker formatter (BC)
Durham Goode <durham@fb.com>
parents: 15501
diff changeset
    68
  $ cat a
11797
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    69
  <<<<<<< local
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    70
  something else
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    71
  =======
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    72
  something
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    73
  >>>>>>> other