hgbook

changeset 119:b252526b44aa

Missed a file.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed Nov 15 13:10:23 2006 -0800 (2006-11-15)
parents 1ee53cb37a99
children 51c9168ab5f8
files en/examples/daily.copy
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/examples/daily.copy	Wed Nov 15 13:10:23 2006 -0800
     1.3 @@ -0,0 +1,80 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +#$ name: init
     1.7 +
     1.8 +hg init my-copy
     1.9 +cd my-copy
    1.10 +echo line > file
    1.11 +hg add file
    1.12 +hg commit -m 'Added a file'
    1.13 +
    1.14 +#$ name: clone
    1.15 +
    1.16 +cd ..
    1.17 +hg clone my-copy your-copy
    1.18 +
    1.19 +#$ name: copy
    1.20 +
    1.21 +cd my-copy
    1.22 +hg copy file new-file
    1.23 +
    1.24 +#$ name: status
    1.25 +
    1.26 +hg status
    1.27 +
    1.28 +#$ name: status-copy
    1.29 +
    1.30 +hg status -C
    1.31 +hg commit -m 'Copied file'
    1.32 +
    1.33 +#$ name: other
    1.34 +
    1.35 +cd ../your-copy
    1.36 +echo 'new contents' >> file
    1.37 +hg commit -m 'Changed file'
    1.38 +
    1.39 +#$ name: cat
    1.40 +
    1.41 +cat file
    1.42 +cat ../my-copy/new-file
    1.43 +
    1.44 +#$ name: merge
    1.45 +
    1.46 +hg pull ../my-copy
    1.47 +hg merge
    1.48 +cat new-file
    1.49 +
    1.50 +#$ name:
    1.51 +
    1.52 +cd ..
    1.53 +hg init copy-example
    1.54 +cd copy-example
    1.55 +echo a > a
    1.56 +echo b > b
    1.57 +mkdir c
    1.58 +mkdir c/a
    1.59 +echo c > c/a/c
    1.60 +hg ci -Ama
    1.61 +
    1.62 +#$ name: simple
    1.63 +
    1.64 +hg copy a c
    1.65 +
    1.66 +#$ name: dir-dest
    1.67 +
    1.68 +mkdir d
    1.69 +hg copy a b d
    1.70 +ls d
    1.71 +
    1.72 +#$ name: dir-src
    1.73 +
    1.74 +hg copy c e
    1.75 +
    1.76 +#$ name: dir-src-dest
    1.77 +
    1.78 +hg copy c d
    1.79 +
    1.80 +#$ name: after
    1.81 +
    1.82 +cp a z
    1.83 +hg copy --after a z