hgbook
diff fr/examples/backout @ 963:1dd00abb3fa9
merge with bryan - it's been a while but everything seems ok
author | Romain PELISSE <belaran@gmail.com> |
---|---|
date | Sun Aug 16 03:41:39 2009 +0200 (2009-08-16) |
parents | en/examples/backout@7226e5e750a6 en/examples/backout@547d3aa25ef0 |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/fr/examples/backout Sun Aug 16 03:41:39 2009 +0200 1.3 @@ -0,0 +1,87 @@ 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: 1.75 + 1.76 +echo 'first change' > myfile 1.77 + 1.78 +#$ name: manual.cat 1.79 + 1.80 +cat myfile 1.81 + 1.82 +#$ name: manual.merge 1.83 + 1.84 +hg merge 1.85 +hg commit -m 'merged backout with previous tip' 1.86 +cat myfile 1.87 + 1.88 +#$ name: 1.89 + 1.90 +rm $HGMERGE