hgbook

annotate es/examples/daily.copy @ 634:d1a6ed326f87

Add package and upload script
author Dongsheng Song <dongsheng.song@gmail.com>
date Fri Mar 13 16:01:21 2009 +0800 (2009-03-13)
parents
children
rev   line source
igor@333 1 #!/bin/bash
igor@333 2
igor@333 3 #$ name: init
igor@333 4
igor@333 5 hg init my-copy
igor@333 6 cd my-copy
igor@333 7 echo line > file
igor@333 8 hg add file
igor@333 9 hg commit -m 'Added a file'
igor@333 10
igor@333 11 #$ name: clone
igor@333 12
igor@333 13 cd ..
igor@333 14 hg clone my-copy your-copy
igor@333 15
igor@333 16 #$ name: copy
igor@333 17
igor@333 18 cd my-copy
igor@333 19 hg copy file new-file
igor@333 20
igor@333 21 #$ name: status
igor@333 22
igor@333 23 hg status
igor@333 24
igor@333 25 #$ name: status-copy
igor@333 26
igor@333 27 hg status -C
igor@333 28 hg commit -m 'Copied file'
igor@333 29
igor@333 30 #$ name: other
igor@333 31
igor@333 32 cd ../your-copy
igor@333 33 echo 'new contents' >> file
igor@333 34 hg commit -m 'Changed file'
igor@333 35
igor@333 36 #$ name: cat
igor@333 37
igor@333 38 cat file
igor@333 39 cat ../my-copy/new-file
igor@333 40
igor@333 41 #$ name: merge
igor@333 42
igor@333 43 hg pull ../my-copy
igor@333 44 hg merge
igor@333 45 cat new-file
igor@333 46
igor@333 47 #$ name:
igor@333 48
igor@333 49 cd ..
igor@333 50 hg init copy-example
igor@333 51 cd copy-example
igor@333 52 echo a > a
igor@333 53 echo b > b
igor@333 54 mkdir c
igor@333 55 mkdir c/a
igor@333 56 echo c > c/a/c
igor@333 57 hg ci -Ama
igor@333 58
igor@333 59 #$ name: simple
igor@333 60
igor@333 61 mkdir k
igor@333 62 hg copy a k
igor@333 63 ls k
igor@333 64
igor@333 65 #$ name: dir-dest
igor@333 66
igor@333 67 mkdir d
igor@333 68 hg copy a b d
igor@333 69 ls d
igor@333 70
igor@333 71 #$ name: dir-src
igor@333 72
igor@333 73 hg copy c e
igor@333 74
igor@333 75 #$ name: dir-src-dest
igor@333 76
igor@333 77 hg copy c d
igor@333 78
igor@333 79 #$ name: after
igor@333 80
igor@333 81 cp a z
igor@333 82 hg copy --after a z