Source

histedit / tests / test-histedit-fold-non-commute

Full commit
Augie Fackler bd9a537 

Augie Fackler af41b2e 
Patrick Mézard 95dcfa2 
Augie Fackler bd9a537 




Augie Fackler 49dd12d 
Augie Fackler 114a7d6 
Augie Fackler bd9a537 


























Patrick Mézard 95dcfa2 
Augie Fackler bd9a537 



Augie Fackler aea6bfd 






Augie Fackler bd9a537 


Patrick Mézard 95dcfa2 
Augie Fackler bd9a537 
Augie Fackler aea6bfd 
Augie Fackler bd9a537 








#!/bin/sh

. "$TESTDIR/histedit-helpers.sh"

cat >> $HGRCPATH <<EOF
[extensions]
hgext.graphlog=
EOF

echo "histedit=$(echo $(dirname $(dirname $0)))/hg_histedit.py" >> $HGRCPATH

EDITED=`pwd`/editedhistory
cat > $EDITED <<EOF
pick 177f92b77385 c
pick 055a42cdd887 d
fold 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 % fix up
echo a > e
hg add e
cat > cat.py <<EOF
import sys
print open(sys.argv[1]).read()
print
print
EOF
HGEDITOR="python cat.py" hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'

echo
echo % just continue this time
hg histedit --continue 2>&1 | fixbundle


echo % log after edit
hg log --graph

echo % contents of e
hg cat e

echo % manifest
hg manifest

echo % EOF