hgbook

view es/examples/backout @ 343:2fb78d342e07

changed es/Leame.1st
upgraded the list of files on translation and revision.

added a term (builtin) to the glossary

changed es/concepts.tex
file added to define labels needed by other tex files

changed es/preface.tex
killed a TODO

changed es/tour-basic.tex
I have began the translation of this file. 34% completed, according to vim

changed es/undo.tex
file added to define labels needed by other tex files
author jerojasro@localhost
date Sun Oct 19 19:56:21 2008 -0500 (2008-10-19)
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