Show More
@@ -0,0 +1,103 b'' | |||||
|
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 | |||
|
7 | $ hg st -A | |||
|
8 | ? foo | |||
|
9 | $ hg add foo | |||
|
10 | dry-run; print a warning that this is not a real copy; foo is added | |||
|
11 | $ hg mv --dry-run foo bar | |||
|
12 | foo has not been committed yet, so no copy data will be stored for bar. | |||
|
13 | $ hg st -A | |||
|
14 | A foo | |||
|
15 | should print a warning that this is not a real copy; bar is added | |||
|
16 | $ hg mv foo bar | |||
|
17 | foo has not been committed yet, so no copy data will be stored for bar. | |||
|
18 | $ hg st -A | |||
|
19 | A bar | |||
|
20 | should print a warning that this is not a real copy; foo is added | |||
|
21 | $ hg cp bar foo | |||
|
22 | bar has not been committed yet, so no copy data will be stored for foo. | |||
|
23 | $ hg rm -f bar | |||
|
24 | $ rm bar | |||
|
25 | $ hg st -A | |||
|
26 | A foo | |||
|
27 | $ hg commit -m1 | |||
|
28 | ||||
|
29 | copy --after to a nonexistant target filename | |||
|
30 | $ hg cp -A foo dummy | |||
|
31 | foo: not recording copy - dummy does not exist | |||
|
32 | ||||
|
33 | dry-run; should show that foo is clean | |||
|
34 | $ hg copy --dry-run foo bar | |||
|
35 | $ hg st -A | |||
|
36 | C foo | |||
|
37 | should show copy | |||
|
38 | $ hg copy foo bar | |||
|
39 | $ hg st -C | |||
|
40 | A bar | |||
|
41 | foo | |||
|
42 | ||||
|
43 | shouldn't show copy | |||
|
44 | $ hg commit -m2 | |||
|
45 | $ hg st -C | |||
|
46 | ||||
|
47 | should match | |||
|
48 | $ hg debugindex .hg/store/data/foo.i | |||
|
49 | rev offset length base linkrev nodeid p1 p2 | |||
|
50 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |||
|
51 | $ hg debugrename bar | |||
|
52 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |||
|
53 | ||||
|
54 | $ echo bleah > foo | |||
|
55 | $ echo quux > bar | |||
|
56 | $ hg commit -m3 | |||
|
57 | ||||
|
58 | should not be renamed | |||
|
59 | $ hg debugrename bar | |||
|
60 | bar not renamed | |||
|
61 | ||||
|
62 | $ hg copy -f foo bar | |||
|
63 | should show copy | |||
|
64 | $ hg st -C | |||
|
65 | M bar | |||
|
66 | foo | |||
|
67 | $ hg commit -m3 | |||
|
68 | ||||
|
69 | should show no parents for tip | |||
|
70 | $ hg debugindex .hg/store/data/bar.i | |||
|
71 | rev offset length base linkrev nodeid p1 p2 | |||
|
72 | 0 0 69 0 1 7711d36246cc 000000000000 000000000000 | |||
|
73 | 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000 | |||
|
74 | 2 75 81 1 3 b2558327ea8d 000000000000 000000000000 | |||
|
75 | should match | |||
|
76 | $ hg debugindex .hg/store/data/foo.i | |||
|
77 | rev offset length base linkrev nodeid p1 p2 | |||
|
78 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |||
|
79 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 | |||
|
80 | $ hg debugrename bar | |||
|
81 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |||
|
82 | ||||
|
83 | should show no copies | |||
|
84 | $ hg st -C | |||
|
85 | ||||
|
86 | copy --after on an added file | |||
|
87 | $ cp bar baz | |||
|
88 | $ hg add baz | |||
|
89 | $ hg cp -A bar baz | |||
|
90 | $ hg st -C | |||
|
91 | A baz | |||
|
92 | bar | |||
|
93 | ||||
|
94 | foo was clean: | |||
|
95 | $ hg st -AC foo | |||
|
96 | C foo | |||
|
97 | but it's considered modified after a copy --after --force | |||
|
98 | $ hg copy -Af bar foo | |||
|
99 | $ hg st -AC foo | |||
|
100 | M foo | |||
|
101 | bar | |||
|
102 | ||||
|
103 | $ exit 0 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now