tests/test-issue322.t
author Martin Geisler <mg@lazybytes.net>
Sat, 11 Sep 2010 00:40:19 +0200
changeset 12248 e1cf13e9e051
parent 12195 ee41be2bbf5a
child 12316 4134686b83e1
permissions -rw-r--r--
merge with i18n-default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 4659
diff changeset
     1
# http://mercurial.selenic.com/bts/issue322
2946
a7a9ba7a9f48 add test for issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     2
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     3
File replaced with directory:
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
     4
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     5
  $ hg init a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     6
  $ cd a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     7
  $ echo a > a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     8
  $ hg commit -Ama
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
     9
  adding a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    10
  $ rm a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    11
  $ mkdir a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    12
  $ echo a > a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    13
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    14
Should fail - would corrupt dirstate:
2946
a7a9ba7a9f48 add test for issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    15
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    16
  $ hg add a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    17
  abort: file 'a' in dirstate clashes with 'a/a'
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
    18
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    19
  $ cd ..
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    20
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    21
Directory replaced with file:
2946
a7a9ba7a9f48 add test for issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    22
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    23
  $ hg init c
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    24
  $ cd c
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    25
  $ mkdir a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    26
  $ echo a > a/a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    27
  $ hg commit -Ama
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    28
  adding a/a
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
    29
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    30
  $ rm -r a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    31
  $ echo a > a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    32
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    33
Should fail - would corrupt dirstate:
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
    34
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    35
  $ hg add a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    36
  abort: directory 'a' already in dirstate
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
    37
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    38
  $ cd ..
2953
3d5547845158 fix issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2949
diff changeset
    39
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    40
Directory replaced with file:
2949
7356fa3cff2c add other dir/file case to test for issue322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2946
diff changeset
    41
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    42
  $ hg init d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    43
  $ cd d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    44
  $ mkdir b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    45
  $ mkdir b/c
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    46
  $ echo a > b/c/d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    47
  $ hg commit -Ama
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    48
  adding b/c/d
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    49
  $ rm -r b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    50
  $ echo a > b
2953
3d5547845158 fix issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2949
diff changeset
    51
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    52
Should fail - would corrupt dirstate:
2953
3d5547845158 fix issue 322.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2949
diff changeset
    53
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    54
  $ hg add b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    55
  abort: directory 'b' already in dirstate
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    56
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    57
  $ exit 0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 8936
diff changeset
    58