hgbook
view en/examples/backout @ 171:8c1703a98266
Add a dependency on htlatex to HTML targets, even though we don't call it.
If the files it ships with aren't present, we can't build HTML.
If the files it ships with aren't present, we can't build HTML.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Mar 26 23:57:58 2007 -0700 (2007-03-26) |
parents | c9aad709bd3a |
children | 5fc4a45c069f |
line source
1 #!/bin/bash
3 # We have to fake the merges here, because they cause conflicts with
4 # three-way command-line merge, and kdiff3 may not be available.
6 export HGMERGE=$(mktemp)
7 echo '#!/bin/sh' >> $HGMERGE
8 echo 'echo first change > "$1"' >> $HGMERGE
9 echo 'echo third change > "$1"' >> $HGMERGE
10 chmod 700 $HGMERGE
12 #$ name: init
14 hg init myrepo
15 cd myrepo
16 echo first change >> myfile
17 hg add myfile
18 hg commit -m 'first change'
19 echo second change >> myfile
20 hg commit -m 'second change'
22 #$ name: simple
24 hg backout -m 'back out second change' tip
25 cat myfile
27 #$ name: simple.log
28 #$ ignore: \s+200[78]-.*
30 hg log --style compact
32 #$ name: non-tip.clone
34 cd ..
35 hg clone -r1 myrepo non-tip-repo
36 cd non-tip-repo
38 #$ name: non-tip.backout
40 echo third change >> myfile
41 hg commit -m 'third change'
42 hg backout --merge -m 'back out second change' 1
44 #$ name: non-tip.cat
45 cat myfile
47 #$ name: manual.clone
49 cd ..
50 hg clone -r1 myrepo newrepo
51 cd newrepo
53 #$ name: manual.backout
55 echo third change >> myfile
56 hg commit -m 'third change'
57 hg backout -m 'back out second change' 1
59 #$ name: manual.log
61 hg log --style compact
63 #$ name: manual.parents
65 hg parents
67 #$ name: manual.heads
69 hg heads
71 #$ name: manual.cat
73 cat myfile
75 #$ name: manual.merge
77 hg merge
78 hg commit -m 'merged backout with previous tip'
79 cat myfile
81 #$ name:
83 rm $HGMERGE