tests/test-amend.t
branchstable
changeset 44300 5f55b5c35630
parent 43894 774cee0e95c6
child 44377 1813f79017ac
equal deleted inserted replaced
44299:ee0959e7d435 44300:5f55b5c35630
   483   $ cd $TESTTMP
   483   $ cd $TESTTMP
   484   $ hg init modify-during-amend; cd modify-during-amend
   484   $ hg init modify-during-amend; cd modify-during-amend
   485   $ echo r0 > foo; hg commit -qAm "r0"
   485   $ echo r0 > foo; hg commit -qAm "r0"
   486   $ echo alpha > foo; hg commit -qm "alpha"
   486   $ echo alpha > foo; hg commit -qm "alpha"
   487   $ echo beta >> foo
   487   $ echo beta >> foo
   488   $ cat > $TESTTMP/sleepy_editor.sh <<EOF
   488   $ cat > $TESTTMP/touchy_editor.sh <<EOF
       
   489   > sleep 1
       
   490   > echo delta >> $TESTTMP/modify-during-amend/foo
       
   491   > sleep 1
   489   > echo hi > "\$1"
   492   > echo hi > "\$1"
   490   > sleep 3
   493   > sleep 1
   491   > EOF
   494   > EOF
   492   $ HGEDITOR="sh $TESTTMP/sleepy_editor.sh" hg commit --amend &
   495   $ HGEDITOR="sh $TESTTMP/touchy_editor.sh" hg commit --amend
   493   $ sleep 1
       
   494   $ echo delta >> foo
       
   495   $ sleep 3
       
   496   $ if (hg diff -c . | grep 'delta' >/dev/null) || [ -n "$(hg status)" ]; then
   496   $ if (hg diff -c . | grep 'delta' >/dev/null) || [ -n "$(hg status)" ]; then
   497   >   echo "OK."
   497   >   echo "OK."
   498   > else
   498   > else
   499   >   echo "Bug detected. 'delta' is not part of the commit OR the wdir"
   499   >   echo "Bug detected. 'delta' is not part of the commit OR the wdir"
   500   >   echo "Diff and status before rebuild:"
   500   >   echo "Diff and status before rebuild:"