Mercurial > hg
view tests/test-histedit-non-commute @ 17071:11f26e2669aa
command: creation of obsolete marker
* add metadata encoding/decoding ability
* add a method to obsstore to help creating marker
* add a debug command to create marker
author | Pierre-Yves.David@ens-lyon.org |
---|---|
date | Thu, 07 Jun 2012 19:15:23 +0200 |
parents | 168cc52ad7c2 |
children |
line wrap: on
line source
#!/bin/sh . "$TESTDIR/histedit-helpers.sh" cat >> $HGRCPATH <<EOF [extensions] graphlog= histedit= EOF EDITED=`pwd`/editedhistory cat > $EDITED <<EOF pick 177f92b77385 c pick 055a42cdd887 d pick bfa474341cc9 does not commute with e pick e860deea161a e pick 652413bf663e f EOF initrepo () { hg init r cd r for x in a b c d e f ; do echo $x > $x hg add $x hg ci -m $x done echo a >> e hg ci -m 'does not commute with e' } initrepo echo % log before edit hg log --graph echo % edit the history HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle echo % abort the edit hg histedit --abort 2>&1 | fixbundle echo echo echo % second edit set hg log --graph echo % edit the history HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle echo % fix up echo a > e hg add e hg histedit --continue 2>&1 | fixbundle echo echo % just continue this time hg histedit --continue 2>&1 | fixbundle echo % log after edit hg log --graph echo % start over cd .. rm -r r initrepo cat > $EDITED <<EOF pick 177f92b77385 c pick 055a42cdd887 d mess bfa474341cc9 does not commute with e pick e860deea161a e pick 652413bf663e f EOF echo % edit the history, this time with a fold action HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle echo echo a > e hg add e HGEDITOR="cat $EDITED > " hg histedit --continue 2>&1 | fixbundle echo % second edit also fails, but just continue hg histedit --continue 2>&1 | fixbundle echo % post message fix hg log --graph echo % EOF