Mercurial > hg
annotate tests/test-add.t @ 11800:88c3ff051270
tests: unify test-transplant
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Thu, 12 Aug 2010 22:14:19 +0900 |
parents | 06793ad30575 |
children | f2daa6ab514a |
rev | line source |
---|---|
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
1 $ hg init a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
2 $ cd a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
3 $ echo a > a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
4 $ hg add -n |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
5 adding a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
6 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
7 ? a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
8 $ hg add |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
9 adding a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
10 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
11 A a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
12 $ hg forget a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
13 $ hg add |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
14 adding a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
15 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
16 A a |
5207
212de429e000
make hg add of a removed file unremove the file
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
17 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
18 $ echo b > b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
19 $ hg add -n b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
20 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
21 A a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
22 ? b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
23 $ hg add b || echo "failed to add b" |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
24 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
25 A a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
26 A b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
27 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
28 should fail |
5207
212de429e000
make hg add of a removed file unremove the file
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
29 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
30 $ hg add b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
31 b already tracked! |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
32 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
33 A a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
34 A b |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
35 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
36 $ hg ci -m 0 --traceback |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
37 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
38 should fail |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
39 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
40 $ hg add a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
41 a already tracked! |
5207
212de429e000
make hg add of a removed file unremove the file
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
42 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
43 $ echo aa > a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
44 $ hg ci -m 1 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
45 $ hg up 0 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
47 $ echo aaa > a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
48 $ hg ci -m 2 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
49 created new head |
5207
212de429e000
make hg add of a removed file unremove the file
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
50 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
51 $ hg merge |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
52 merging a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
53 warning: conflicts during merge. |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
54 merging a failed! |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
55 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
56 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
57 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
58 M a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
59 ? a.orig |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
60 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
61 should fail |
5207
212de429e000
make hg add of a removed file unremove the file
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
62 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
63 $ hg add a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
64 a already tracked! |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
65 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
66 M a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
67 ? a.orig |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
68 $ hg resolve -m a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
69 $ hg ci -m merge |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
70 |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
71 issue683 |
5688
883d887c6408
commands: add exits(1) if a specified file cannot be added (issue 891)
Patrick Mezard <pmezard@gmail.com>
parents:
5207
diff
changeset
|
72 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
73 $ hg forget a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
74 $ hg add a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
75 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
76 ? a.orig |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
77 $ hg rm a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
78 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
79 R a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
80 ? a.orig |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
81 $ echo a > a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
82 $ hg add a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
83 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
84 M a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
85 ? a.orig |
5688
883d887c6408
commands: add exits(1) if a specified file cannot be added (issue 891)
Patrick Mezard <pmezard@gmail.com>
parents:
5207
diff
changeset
|
86 |
11795
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
87 $ hg add c && echo "unexpected addition of missing file" |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
88 c: No such file or directory |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
89 $ echo c > c |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
90 $ hg add d c && echo "unexpected addition of missing file" |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
91 d: No such file or directory |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
92 $ hg st |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
93 M a |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
94 A c |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
95 ? a.orig |
06793ad30575
tests: unify test-add
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9166
diff
changeset
|
96 |