Mercurial > hg
view tests/test-rebase-pull @ 10014:54cd28258ea7
status: add the --change option to display files changed in a revision
This option is similar to the one already used for the diff command.
Unfortunately, the c and C short option are already used for status, so there
is no corresponding short option. However, there is no short option for --rev
either, so that's consistent.
author | Gilles Moris <gilles.moris@free.fr> |
---|---|
date | Mon, 30 Nov 2009 23:51:06 +0100 |
parents | cb08c3765a02 |
children | c52057614c72 |
line wrap: on
line source
#!/bin/sh echo "[extensions]" >> $HGRCPATH echo "graphlog=" >> $HGRCPATH echo "rebase=" >> $HGRCPATH BASE=`pwd` addcommit () { echo $1 > $1 hg add $1 hg commit -d "${2} 0" -m $1 } commit () { hg commit -d "${2} 0" -m $1 } cd $BASE rm -rf a hg init a cd a addcommit "C1" 0 addcommit "C2" 1 cd .. hg clone a b # This is needed to test pull --rebase hg clone a c cd b addcommit "L1" 2 cd ../a addcommit "R1" 3 cd ../b echo echo "% Now b has one revision to be pulled from a" hg pull --rebase 2>&1 | sed -e 's/\(saving bundle to \).*/\1/' \ -e 's/\(pulling from \).*/\1/' hg glog --template '{rev}:{desc}\n' echo echo "% Re-run pull --rebase" hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/' echo echo "% Invoke pull --rebase and nothing to rebase" cd ../c hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/' hg glog --template '{rev}\n' -l 1 echo echo "% pull --rebase --update should ignore --update" hg pull --rebase --update 2>&1 | sed 's/\(pulling from \).*/\1/' echo echo "% pull --rebase doesn't update if nothing has been pulled" hg up 1 hg pull --rebase 2>&1 | sed 's/\(pulling from \).*/\1/' hg glog --template '{rev}\n' -l 1 exit 0