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