hgbook

diff es/examples/daily.files @ 917:93154fbaae9b

Merge with http://bitbucket.org/dukebody/hgbook-alqua/
author Bryan O'Sullivan <bos@serpentine.com>
date Tue Oct 27 21:31:06 2009 -0700 (2009-10-27)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/es/examples/daily.files	Tue Oct 27 21:31:06 2009 -0700
     1.3 @@ -0,0 +1,93 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +#$ name: add
     1.7 +
     1.8 +hg init add-example
     1.9 +cd add-example
    1.10 +echo a > a
    1.11 +hg status
    1.12 +hg add a
    1.13 +hg status
    1.14 +hg commit -m 'Added one file'
    1.15 +hg status
    1.16 +
    1.17 +#$ name: add-dir
    1.18 +
    1.19 +mkdir b
    1.20 +echo b > b/b
    1.21 +echo c > b/c
    1.22 +mkdir b/d
    1.23 +echo d > b/d/d
    1.24 +hg add b
    1.25 +hg commit -m 'Added all files in subdirectory'
    1.26 +
    1.27 +#$ name:
    1.28 +
    1.29 +cd ..
    1.30 +
    1.31 +#$ name: hidden
    1.32 +
    1.33 +hg init hidden-example
    1.34 +cd hidden-example
    1.35 +mkdir empty
    1.36 +touch empty/.hidden
    1.37 +hg add empty/.hidden
    1.38 +hg commit -m 'Manage an empty-looking directory'
    1.39 +ls empty
    1.40 +cd ..
    1.41 +hg clone hidden-example tmp
    1.42 +ls tmp
    1.43 +ls tmp/empty
    1.44 +
    1.45 +#$ name: remove
    1.46 +
    1.47 +hg init remove-example
    1.48 +cd remove-example
    1.49 +echo a > a
    1.50 +mkdir b
    1.51 +echo b > b/b
    1.52 +hg add a b
    1.53 +hg commit -m 'Small example for file removal'
    1.54 +hg remove a
    1.55 +hg status
    1.56 +hg remove b
    1.57 +
    1.58 +#$ name:
    1.59 +
    1.60 +cd ..
    1.61 +
    1.62 +#$ name: missing
    1.63 +hg init missing-example
    1.64 +cd missing-example
    1.65 +echo a > a
    1.66 +hg add a
    1.67 +hg commit -m 'File about to be missing'
    1.68 +rm a
    1.69 +hg status
    1.70 +
    1.71 +#$ name: remove-after
    1.72 +
    1.73 +hg remove --after a
    1.74 +hg status
    1.75 +
    1.76 +#$ name: recover-missing
    1.77 +hg revert a
    1.78 +cat a
    1.79 +hg status
    1.80 +
    1.81 +#$ name:
    1.82 +
    1.83 +cd ..
    1.84 +
    1.85 +#$ name: addremove
    1.86 +
    1.87 +hg init addremove-example
    1.88 +cd addremove-example
    1.89 +echo a > a
    1.90 +echo b > b
    1.91 +hg addremove
    1.92 +
    1.93 +#$ name: commit-addremove
    1.94 +
    1.95 +echo c > c
    1.96 +hg commit -A -m 'Commit with addremove'