igor@333: #!/bin/bash igor@333: igor@333: # We have to fake the merges here, because they cause conflicts with igor@333: # three-way command-line merge, and kdiff3 may not be available. igor@333: igor@333: export HGMERGE=$(mktemp) igor@333: echo '#!/bin/sh' >> $HGMERGE igor@333: echo 'echo first change > "$1"' >> $HGMERGE igor@333: echo 'echo third change >> "$1"' >> $HGMERGE igor@333: chmod 700 $HGMERGE igor@333: igor@333: #$ name: init igor@333: igor@333: hg init myrepo igor@333: cd myrepo igor@333: echo first change >> myfile igor@333: hg add myfile igor@333: hg commit -m 'first change' igor@333: echo second change >> myfile igor@333: hg commit -m 'second change' igor@333: igor@333: #$ name: simple igor@333: igor@333: hg backout -m 'back out second change' tip igor@333: cat myfile igor@333: igor@333: #$ name: simple.log igor@333: #$ ignore: \s+200[78]-.* igor@333: igor@333: hg log --style compact igor@333: igor@333: #$ name: non-tip.clone igor@333: igor@333: cd .. igor@333: hg clone -r1 myrepo non-tip-repo igor@333: cd non-tip-repo igor@333: igor@333: #$ name: non-tip.backout igor@333: igor@333: echo third change >> myfile igor@333: hg commit -m 'third change' igor@333: hg backout --merge -m 'back out second change' 1 igor@333: igor@333: #$ name: non-tip.cat igor@333: cat myfile igor@333: igor@333: #$ name: manual.clone igor@333: igor@333: cd .. igor@333: hg clone -r1 myrepo newrepo igor@333: cd newrepo igor@333: igor@333: #$ name: manual.backout igor@333: igor@333: echo third change >> myfile igor@333: hg commit -m 'third change' igor@333: hg backout -m 'back out second change' 1 igor@333: igor@333: #$ name: manual.log igor@333: igor@333: hg log --style compact igor@333: igor@333: #$ name: manual.parents igor@333: igor@333: hg parents igor@333: igor@333: #$ name: manual.heads igor@333: igor@333: hg heads igor@333: igor@333: #$ name: manual.cat igor@333: igor@333: cat myfile igor@333: igor@333: #$ name: manual.merge igor@333: igor@333: hg merge igor@333: hg commit -m 'merged backout with previous tip' igor@333: cat myfile igor@333: igor@333: #$ name: igor@333: igor@333: rm $HGMERGE