hgbook

view es/examples/backout @ 357:dae36f024e14

some paragraphs translated, added a couple of rules-of-thumb for translation of terms
author Javier Rojas <jerojasro@devnull.li>
date Thu Oct 23 03:13:35 2008 -0500 (2008-10-23)
parents
children
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