hgbook

diff ja/examples/backout @ 1114:527b86d55d4a

inotify: update installation information

inotify is shipped in Mercurial since 1.0, which greatly simplifies the installation process
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Sun Dec 13 16:35:56 2009 +0900 (2009-12-13)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ja/examples/backout	Sun Dec 13 16:35:56 2009 +0900
     1.3 @@ -0,0 +1,83 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +# We have to fake the merges here, because they cause conflicts with
     1.7 +# three-way command-line merge, and kdiff3 may not be available.
     1.8 +
     1.9 +export HGMERGE=$(mktemp)
    1.10 +echo '#!/bin/sh' >> $HGMERGE
    1.11 +echo 'echo first change > "$1"' >> $HGMERGE
    1.12 +echo 'echo third change >> "$1"' >> $HGMERGE
    1.13 +chmod 700 $HGMERGE
    1.14 +
    1.15 +#$ name: init
    1.16 +
    1.17 +hg init myrepo
    1.18 +cd myrepo
    1.19 +echo first change >> myfile
    1.20 +hg add myfile
    1.21 +hg commit -m 'first change'
    1.22 +echo second change >> myfile
    1.23 +hg commit -m 'second change'
    1.24 +
    1.25 +#$ name: simple
    1.26 +
    1.27 +hg backout -m 'back out second change' tip
    1.28 +cat myfile
    1.29 +
    1.30 +#$ name: simple.log
    1.31 +#$ ignore: \s+200[78]-.*
    1.32 +
    1.33 +hg log --style compact
    1.34 +
    1.35 +#$ name: non-tip.clone
    1.36 +
    1.37 +cd ..
    1.38 +hg clone -r1 myrepo non-tip-repo
    1.39 +cd non-tip-repo
    1.40 +
    1.41 +#$ name: non-tip.backout
    1.42 +
    1.43 +echo third change >> myfile
    1.44 +hg commit -m 'third change'
    1.45 +hg backout --merge -m 'back out second change' 1
    1.46 +
    1.47 +#$ name: non-tip.cat
    1.48 +cat myfile
    1.49 +
    1.50 +#$ name: manual.clone
    1.51 +
    1.52 +cd ..
    1.53 +hg clone -r1 myrepo newrepo
    1.54 +cd newrepo
    1.55 +
    1.56 +#$ name: manual.backout
    1.57 +
    1.58 +echo third change >> myfile
    1.59 +hg commit -m 'third change'
    1.60 +hg backout -m 'back out second change' 1
    1.61 +
    1.62 +#$ name: manual.log
    1.63 +
    1.64 +hg log --style compact
    1.65 +
    1.66 +#$ name: manual.parents
    1.67 +
    1.68 +hg parents
    1.69 +
    1.70 +#$ name: manual.heads
    1.71 +
    1.72 +hg heads
    1.73 +
    1.74 +#$ name: manual.cat
    1.75 +
    1.76 +cat myfile
    1.77 +
    1.78 +#$ name: manual.merge
    1.79 +
    1.80 +hg merge
    1.81 +hg commit -m 'merged backout with previous tip'
    1.82 +cat myfile
    1.83 +
    1.84 +#$ name:
    1.85 +
    1.86 +rm $HGMERGE