bos@119: #!/bin/bash bos@119: bos@119: #$ name: init bos@119: bos@119: hg init my-copy bos@119: cd my-copy bos@119: echo line > file bos@119: hg add file bos@119: hg commit -m 'Added a file' bos@119: bos@119: #$ name: clone bos@119: bos@119: cd .. bos@119: hg clone my-copy your-copy bos@119: bos@119: #$ name: copy bos@119: bos@119: cd my-copy bos@119: hg copy file new-file bos@119: bos@119: #$ name: status bos@119: bos@119: hg status bos@119: bos@119: #$ name: status-copy bos@119: bos@119: hg status -C bos@119: hg commit -m 'Copied file' bos@119: bos@119: #$ name: other bos@119: bos@119: cd ../your-copy bos@119: echo 'new contents' >> file bos@119: hg commit -m 'Changed file' bos@119: bos@119: #$ name: cat bos@119: bos@119: cat file bos@119: cat ../my-copy/new-file bos@119: bos@119: #$ name: merge bos@119: bos@119: hg pull ../my-copy bos@119: hg merge bos@119: cat new-file bos@119: bos@119: #$ name: bos@119: bos@119: cd .. bos@119: hg init copy-example bos@119: cd copy-example bos@119: echo a > a bos@119: echo b > b bos@119: mkdir c bos@119: mkdir c/a bos@119: echo c > c/a/c bos@119: hg ci -Ama bos@119: bos@119: #$ name: simple bos@119: bos@183: mkdir k bos@183: hg copy a k bos@183: ls k bos@119: bos@119: #$ name: dir-dest bos@119: bos@119: mkdir d bos@119: hg copy a b d bos@119: ls d bos@119: bos@119: #$ name: dir-src bos@119: bos@119: hg copy c e bos@119: bos@119: #$ name: dir-src-dest bos@119: bos@119: hg copy c d bos@119: bos@119: #$ name: after bos@119: bos@119: cp a z bos@119: hg copy --after a z