Mercurial > hg
view tests/test-rebase-rename @ 10827:b66388f6adfa
color: don't split colors across lines (which confuses less -R)
Currently, less -R doesn't support colors spanning multiple lines; only
the first line will be colorized.
Instead of allowing colors to span multiple lines, the color extension
now applies colors to each line it receives, even when ui.write() is
given multiple lines in one call.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 02 Apr 2010 15:22:19 -0500 |
parents | b969611064ae |
children | b345b1cc124f |
line wrap: on
line source
#!/bin/sh echo "[extensions]" >> $HGRCPATH echo "rebase=" >> $HGRCPATH echo "[diff]" >> $HGRCPATH echo "git=1" >> $HGRCPATH BASE=`pwd` cleanoutput () { sed -e 's/\(Rebase status stored to\).*/\1/' \ -e 's/\(Rebase status restored from\).*/\1/' \ -e 's/\(saving bundle to \).*/\1/' } hg init repo1 cd repo1 echo "a">a hg commit -Am "A" --date '0 0' echo "b"> b hg commit -Am "B" --date '1 0' hg up -C 0 hg mv a a-renamed hg commit -m 'rename A' --date '2 0' echo echo '% Rename is tracked' hg log -p -r tip --template '{rev}:{desc}\n' echo '% Rebase the revision containing the rename' hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput echo echo '% Rename is not lost' hg log -p -r tip --template '{rev}:{desc}\n' cd $BASE rm -rf repo1 hg init repo1 cd repo1 echo "a">a hg commit -Am "A" --date '0 0' echo "b"> b hg commit -Am "B" --date '1 0' hg up -C 0 hg cp a a-copied hg commit -m 'copy A' --date '2 0' echo echo '% Copy is tracked' hg log -p -r tip --template '{rev}:{desc}\n' echo '% Rebase the revision containing the copy' hg rebase -s 2 -d 1 --quiet 2>&1 | cleanoutput echo echo '% Copy is not lost' hg log -p -r tip --template '{rev}:{desc}\n'