Mercurial > hg
view tests/test-rebase-interruptions @ 9051:f8e25885d975
commands: wrapped docstrings at 78 characters
We have always had a left margin of 4 characters -- probably just
because that's how docstrings for top-level functions turn out by
default, but it also looks nice in the built-in help.
The docstrings were wrapped at 70 characters, which is the default for
Emacs. However, this gives a right margin of 10 characters in a
standard 80 character terminal.
I've now wrapped the relevant docstrings at 78 characters, effectively
killing the right margin. The asymmetric margins looked a bit odd and
some of the text looked cramped with a right margin, so Dirkjan and I
felt that it was best to remove it entirely. The two character gap was
kept to have some space between the border of the terminal -- it will
also make diffs involving the docstrings fit in a 80 character line.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Tue, 07 Jul 2009 23:54:30 +0200 |
parents | 8766fee6f225 |
children | b345b1cc124f |
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 } createrepo () { cd $BASE rm -rf a hg init a cd a addcommit "A" 0 addcommit "B" 1 echo "C" >> A commit "C" 2 hg update -C 0 echo "D" >> A commit "D" 3 addcommit "E" 4 } echo "% Changes during an interruption - continue" createrepo > /dev/null 2>&1 hg glog --template '{rev}: {desc}\n' echo echo "% - Rebasing B onto E" hg rebase -s 1 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/' echo echo "% - Force a commit on C during the interruption" hg update -C 2 addcommit "Extra" 5 hg glog --template '{rev}: {desc}\n' echo echo "% - Resume the rebasing" hg rebase --continue echo echo "% - Solve the conflict and go on" echo 'conflict solved' > A rm A.orig hg resolve -m A hg rebase --continue hg glog --template '{rev}: {desc}\n' echo echo echo "% Changes during an interruption - abort" createrepo > /dev/null 2>&1 hg glog --template '{rev}: {desc}\n' echo echo "% Rebasing B onto E" hg rebase -s 1 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/' echo echo "% Force a commit on B' during the interruption" hg update -C 5 addcommit "Extra" 6 hg glog --template '{rev}: {desc}\n' echo echo "% Abort the rebasing" hg rebase --abort hg glog --template '{rev}: {desc}\n' exit 0