annotate tests/test-copy2.t @ 12010:ce818cf215dc

merge with stable
author Matt Mackall <mpm@selenic.com>
date Sat, 21 Aug 2010 10:48:49 -0500
parents 106311e7740f
children 4134686b83e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11940
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
1 $ hg init
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
2 $ echo foo > foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
3 should fail - foo is not managed
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
4 $ hg mv foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
5 foo: not copying - file is not managed
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
6 abort: no files to copy
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
7 $ hg st -A
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
8 ? foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
9 $ hg add foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
10 dry-run; print a warning that this is not a real copy; foo is added
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
11 $ hg mv --dry-run foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
12 foo has not been committed yet, so no copy data will be stored for bar.
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
13 $ hg st -A
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
14 A foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
15 should print a warning that this is not a real copy; bar is added
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
16 $ hg mv foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
17 foo has not been committed yet, so no copy data will be stored for bar.
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
18 $ hg st -A
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
19 A bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
20 should print a warning that this is not a real copy; foo is added
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
21 $ hg cp bar foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
22 bar has not been committed yet, so no copy data will be stored for foo.
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
23 $ hg rm -f bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
24 $ rm bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
25 $ hg st -A
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
26 A foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
27 $ hg commit -m1
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
28
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
29 copy --after to a nonexistant target filename
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
30 $ hg cp -A foo dummy
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
31 foo: not recording copy - dummy does not exist
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
32
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
33 dry-run; should show that foo is clean
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
34 $ hg copy --dry-run foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
35 $ hg st -A
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
36 C foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
37 should show copy
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
38 $ hg copy foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
39 $ hg st -C
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
40 A bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
41 foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
42
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
43 shouldn't show copy
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
44 $ hg commit -m2
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
45 $ hg st -C
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
46
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
47 should match
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
48 $ hg debugindex .hg/store/data/foo.i
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
49 rev offset length base linkrev nodeid p1 p2
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
50 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
51 $ hg debugrename bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
52 bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
53
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
54 $ echo bleah > foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
55 $ echo quux > bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
56 $ hg commit -m3
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
57
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
58 should not be renamed
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
59 $ hg debugrename bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
60 bar not renamed
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
61
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
62 $ hg copy -f foo bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
63 should show copy
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
64 $ hg st -C
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
65 M bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
66 foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
67 $ hg commit -m3
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
68
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
69 should show no parents for tip
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
70 $ hg debugindex .hg/store/data/bar.i
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
71 rev offset length base linkrev nodeid p1 p2
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
72 0 0 69 0 1 7711d36246cc 000000000000 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
73 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
74 2 75 81 1 3 b2558327ea8d 000000000000 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
75 should match
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
76 $ hg debugindex .hg/store/data/foo.i
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
77 rev offset length base linkrev nodeid p1 p2
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
78 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
79 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
80 $ hg debugrename bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
81 bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
82
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
83 should show no copies
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
84 $ hg st -C
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
85
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
86 copy --after on an added file
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
87 $ cp bar baz
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
88 $ hg add baz
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
89 $ hg cp -A bar baz
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
90 $ hg st -C
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
91 A baz
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
92 bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
93
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
94 foo was clean:
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
95 $ hg st -AC foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
96 C foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
97 but it's considered modified after a copy --after --force
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
98 $ hg copy -Af bar foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
99 $ hg st -AC foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
100 M foo
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
101 bar
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
102
106311e7740f tests: unify test-copy2
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
diff changeset
103 $ exit 0