hgbook

view es/examples/daily.copy @ 419:7f5d542be96b

corrected some typos, added some accents. jerojasro is playing to the reviewer too early ;)
author Javier Rojas <jerojasro@devnull.li>
date Fri Nov 14 00:12:51 2008 -0500 (2008-11-14)
parents
children
line source
1 #!/bin/bash
3 #$ name: init
5 hg init my-copy
6 cd my-copy
7 echo line > file
8 hg add file
9 hg commit -m 'Added a file'
11 #$ name: clone
13 cd ..
14 hg clone my-copy your-copy
16 #$ name: copy
18 cd my-copy
19 hg copy file new-file
21 #$ name: status
23 hg status
25 #$ name: status-copy
27 hg status -C
28 hg commit -m 'Copied file'
30 #$ name: other
32 cd ../your-copy
33 echo 'new contents' >> file
34 hg commit -m 'Changed file'
36 #$ name: cat
38 cat file
39 cat ../my-copy/new-file
41 #$ name: merge
43 hg pull ../my-copy
44 hg merge
45 cat new-file
47 #$ name:
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
59 #$ name: simple
61 mkdir k
62 hg copy a k
63 ls k
65 #$ name: dir-dest
67 mkdir d
68 hg copy a b d
69 ls d
71 #$ name: dir-src
73 hg copy c e
75 #$ name: dir-src-dest
77 hg copy c d
79 #$ name: after
81 cp a z
82 hg copy --after a z