tests/test-pathconflicts-basic.t
author Mark Thomas <mbthomas@fb.com>
Mon, 02 Oct 2017 14:05:30 -0700
changeset 34544 34c8080d12ac
child 34552 33c8a6837181
permissions -rw-r--r--
tests: add a test demonstrating basic path conflict failures Differential Revision: https://phab.mercurial-scm.org/D773
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34544
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     1
  $ hg init repo
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     2
  $ cd repo
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     3
  $ echo base > base
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     4
  $ hg add base
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     5
  $ hg commit -m "base"
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     6
  $ hg bookmark -i base
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     7
  $ echo 1 > a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     8
  $ hg add a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     9
  $ hg commit -m "file"
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    10
  $ hg bookmark -i file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    11
  $ echo 2 > a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    12
  $ hg commit -m "file2"
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    13
  $ hg bookmark -i file2
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    14
  $ hg up -q 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    15
  $ mkdir a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    16
  $ echo 2 > a/b
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    17
  $ hg add a/b
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    18
  $ hg commit -m "dir"
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    19
  created new head
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    20
  $ hg bookmark -i dir
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    21
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    22
Basic merge - local file conflicts with remote directory
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    23
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    24
  $ hg up -q file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    25
  $ hg bookmark -i
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    26
  $ hg merge --verbose dir
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    27
  resolving manifests
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    28
  getting a/b
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    29
  abort: *: '$TESTTMP/repo/a/b' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    30
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    31
  $ hg update --clean .
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    32
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    33
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    34
Basic update - local directory conflicts with remote file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    35
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    36
  $ hg up -q 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    37
  $ mkdir a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    38
  $ echo 3 > a/b
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    39
  $ hg up file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    40
  abort: *: '$TESTTMP/repo/a' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    41
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    42
  $ hg up --clean file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    43
  abort: *: '$TESTTMP/repo/a' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    44
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    45
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    46
Repo is in a very bad state now - recover manually
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    47
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    48
  $ rm -r a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    49
  $ hg up -q --clean 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    50
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    51
Basic update - untracked file conflicts with remote directory
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    52
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    53
  $ hg up -q 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    54
  $ echo untracked > a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    55
  $ hg up --config merge.checkunknown=warn dir
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    56
  abort: *: '$TESTTMP/repo/a/b' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    57
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    58
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    59
Repo is in a very bad state now - recover manually
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    60
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    61
  $ rm -f a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    62
  $ hg up -q --clean 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    63
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    64
Basic clean update - local directory conflicts with changed remote file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    65
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    66
  $ hg up -q file
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    67
  $ rm a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    68
  $ mkdir a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    69
  $ echo 4 > a/b
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    70
  $ hg up file2
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    71
  abort: *: '$TESTTMP/repo/a' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    72
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    73
  $ hg up --clean file2
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    74
  abort: *: '$TESTTMP/repo/a' (glob)
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    75
  [255]
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    76
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    77
Repo is in a very bad state now - recover manually
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    78
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    79
  $ rm -r a
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    80
  $ hg up -q --clean 0
34c8080d12ac tests: add a test demonstrating basic path conflict failures
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    81