Mercurial > hg
annotate tests/test-issue322.t @ 12269:877236cdd437
add: move main part to cmdutil to make it easier to reuse
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 13 Sep 2010 13:09:11 +0200 |
parents | ee41be2bbf5a |
children | 4134686b83e1 |
rev | line source |
---|---|
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 | 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 | 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 | 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 | 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 | 51 |
12195
ee41be2bbf5a
tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8936
diff
changeset
|
52 Should fail - would corrupt dirstate: |
2953 | 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 |