tests/test-conflict.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 13 Nov 2013 15:55:30 +0900
changeset 20176 4c96c50ef937
parent 15501 2371f4aea665
child 21519 25d5a9ecbb85
permissions -rw-r--r--
subrepo: check phase of state in each subrepositories before committing Before this patch, phase of newly created commit is determined by "phases.new-commit" configuration regardless of phase of state in each subrepositories. For example, this may cause the "public" revision in the parent repository referring the "secret" one in subrepository. This patch checks phase of state in each subrepositories before committing in the parent, and aborts or changes phase of newly created commit if subrepositories have more restricted phase than the parent. This patch uses "follow" as default value of "phases.checksubrepos" configuration, because it can keep consistency between phases of the parent and subrepositories without breaking existing tool chains.
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
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    25
  <<<<<<< local
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    26
  something else
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    27
  =======
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    28
  something
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    29
  >>>>>>> other
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    30
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    31
  $ hg status
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    32
  M a
66e4e8e8b1e5 tests: unify test-conflict
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 4387
diff changeset
    33
  ? a.orig