Mercurial > hg
annotate tests/test-copy2.t @ 16202:53e2cd303ecf stable 2.1.1
dirstate: filecacheify _ignore (issue3278)
This still doesn't handle the case where a command is run with
--config ui.ignore=path since we only look for changes in .hgignore.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 01 Mar 2012 17:49:59 +0200 |
parents | 5a931246afc5 |
children | 4fe874697a4d |
rev | line source |
---|---|
11940 | 1 $ hg init |
2 $ echo foo > foo | |
3 should fail - foo is not managed | |
4 $ hg mv foo bar | |
5 foo: not copying - file is not managed | |
6 abort: no files to copy | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11940
diff
changeset
|
7 [255] |
11940 | 8 $ hg st -A |
9 ? foo | |
10 $ hg add foo | |
11 dry-run; print a warning that this is not a real copy; foo is added | |
12 $ hg mv --dry-run foo bar | |
13 foo has not been committed yet, so no copy data will be stored for bar. | |
14 $ hg st -A | |
15 A foo | |
16 should print a warning that this is not a real copy; bar is added | |
17 $ hg mv foo bar | |
18 foo has not been committed yet, so no copy data will be stored for bar. | |
19 $ hg st -A | |
20 A bar | |
21 should print a warning that this is not a real copy; foo is added | |
22 $ hg cp bar foo | |
23 bar has not been committed yet, so no copy data will be stored for foo. | |
24 $ hg rm -f bar | |
25 $ rm bar | |
26 $ hg st -A | |
27 A foo | |
28 $ hg commit -m1 | |
29 | |
14517
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
30 moving a missing file |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
31 $ rm foo |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
32 $ hg mv foo foo3 |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
33 foo: deleted in working copy |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
34 foo3 does not exist! |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
35 $ hg up -qC . |
5a931246afc5
test-copy2: add case for moving a missing file
Adrian Buehlmann <adrian@cadifra.com>
parents:
14182
diff
changeset
|
36 |
11940 | 37 copy --after to a nonexistant target filename |
38 $ hg cp -A foo dummy | |
39 foo: not recording copy - dummy does not exist | |
40 | |
41 dry-run; should show that foo is clean | |
42 $ hg copy --dry-run foo bar | |
43 $ hg st -A | |
44 C foo | |
45 should show copy | |
46 $ hg copy foo bar | |
47 $ hg st -C | |
48 A bar | |
49 foo | |
50 | |
51 shouldn't show copy | |
52 $ hg commit -m2 | |
53 $ hg st -C | |
54 | |
55 should match | |
14182
ec5886db9dc6
tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents:
12327
diff
changeset
|
56 $ hg debugindex foo |
11940 | 57 rev offset length base linkrev nodeid p1 p2 |
58 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |
59 $ hg debugrename bar | |
60 bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
61 | |
62 $ echo bleah > foo | |
63 $ echo quux > bar | |
64 $ hg commit -m3 | |
65 | |
66 should not be renamed | |
67 $ hg debugrename bar | |
68 bar not renamed | |
69 | |
70 $ hg copy -f foo bar | |
71 should show copy | |
72 $ hg st -C | |
73 M bar | |
74 foo | |
75 $ hg commit -m3 | |
76 | |
77 should show no parents for tip | |
14182
ec5886db9dc6
tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents:
12327
diff
changeset
|
78 $ hg debugindex bar |
11940 | 79 rev offset length base linkrev nodeid p1 p2 |
80 0 0 69 0 1 7711d36246cc 000000000000 000000000000 | |
81 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000 | |
82 2 75 81 1 3 b2558327ea8d 000000000000 000000000000 | |
83 should match | |
14182
ec5886db9dc6
tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents:
12327
diff
changeset
|
84 $ hg debugindex foo |
11940 | 85 rev offset length base linkrev nodeid p1 p2 |
86 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |
87 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 | |
88 $ hg debugrename bar | |
89 bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |
90 | |
91 should show no copies | |
92 $ hg st -C | |
93 | |
94 copy --after on an added file | |
95 $ cp bar baz | |
96 $ hg add baz | |
97 $ hg cp -A bar baz | |
98 $ hg st -C | |
99 A baz | |
100 bar | |
101 | |
102 foo was clean: | |
103 $ hg st -AC foo | |
104 C foo | |
105 but it's considered modified after a copy --after --force | |
106 $ hg copy -Af bar foo | |
107 $ hg st -AC foo | |
108 M foo | |
109 bar |