Mercurial > hgbook
annotate en/examples/daily.copy @ 724:cfdb601a3c8b
Fix imagedata fileref in xml files, and replace ':' with '.' in id attribute
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Thu, 12 Mar 2009 15:51:39 +0800 |
parents | fe74ace5fe1c |
children | 477d6a3e5023 |
rev | line source |
---|---|
119 | 1 #!/bin/bash |
2 | |
3 #$ name: init | |
4 | |
5 hg init my-copy | |
6 cd my-copy | |
7 echo line > file | |
8 hg add file | |
9 hg commit -m 'Added a file' | |
10 | |
11 #$ name: clone | |
12 | |
13 cd .. | |
14 hg clone my-copy your-copy | |
15 | |
16 #$ name: copy | |
17 | |
18 cd my-copy | |
19 hg copy file new-file | |
20 | |
21 #$ name: status | |
22 | |
23 hg status | |
24 | |
25 #$ name: status-copy | |
26 | |
27 hg status -C | |
28 hg commit -m 'Copied file' | |
29 | |
30 #$ name: other | |
31 | |
32 cd ../your-copy | |
33 echo 'new contents' >> file | |
34 hg commit -m 'Changed file' | |
35 | |
36 #$ name: cat | |
37 | |
38 cat file | |
39 cat ../my-copy/new-file | |
40 | |
41 #$ name: merge | |
42 | |
43 hg pull ../my-copy | |
44 hg merge | |
45 cat new-file | |
46 | |
47 #$ name: | |
48 | |
49 cd .. | |
50 hg init copy-example | |
51 cd copy-example | |
52 echo a > a | |
53 echo b > b | |
54 mkdir c | |
55 mkdir c/a | |
56 echo c > c/a/c | |
57 hg ci -Ama | |
58 | |
59 #$ name: simple | |
60 | |
183
fe74ace5fe1c
Fix simple copy example.
Bryan O'Sullivan <bos@serpentine.com>
parents:
119
diff
changeset
|
61 mkdir k |
fe74ace5fe1c
Fix simple copy example.
Bryan O'Sullivan <bos@serpentine.com>
parents:
119
diff
changeset
|
62 hg copy a k |
fe74ace5fe1c
Fix simple copy example.
Bryan O'Sullivan <bos@serpentine.com>
parents:
119
diff
changeset
|
63 ls k |
119 | 64 |
65 #$ name: dir-dest | |
66 | |
67 mkdir d | |
68 hg copy a b d | |
69 ls d | |
70 | |
71 #$ name: dir-src | |
72 | |
73 hg copy c e | |
74 | |
75 #$ name: dir-src-dest | |
76 | |
77 hg copy c d | |
78 | |
79 #$ name: after | |
80 | |
81 cp a z | |
82 hg copy --after a z |