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