Re: [GUILT v2 25/29] "guilt push" now fails when there are no more patches to push.
On Tue, May 13, 2014 at 10:31:01PM +0200, Per Cederqvist wrote:
Show 20 quoted lines
> This makes it easier to script operations on the entire queue, for
> example run the test suite on each patch in the queue:
>
> guilt pop -a;while guilt push; do make test||break; done
>
> This brings "guilt push" in line with the push operation in Mercurial
> Queues (hg qpush), which fails when there are no patches to apply.
>
> Updated the test suite.
>
> "guilt push -a" still does not fail. (It successfully manages to
> ensure that all patches are pushed, even if it did not have to do
> anything to make it so.)
>
> Signed-off-by: Per Cederqvist <cederp@opera.com>
> ---
> guilt-push | 19 ++++++-----
> regression/t-020.out | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> regression/t-020.sh | 13 +++++++-
> 3 files changed, 113 insertions(+), 8 deletions(-)
Show 17 quoted lines
> diff --git a/regression/t-020.sh b/regression/t-020.sh
> index 906aec6..0f9f85d 100755
> --- a/regression/t-020.sh
> +++ b/regression/t-020.sh
> @@ -26,6 +26,17 @@ guilt series | while read n ; do
> done
>
> #
> +# pushing when there is nothing to push
> +#
> +
> +shouldfail guilt push
> +cmd guilt push -a
> +
> +cmd list_files
> +
> +cmd git log -p
I don't particularly care for the git-log. Otherwise it looks good.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Show 17 quoted lines
> +
> +#
> # pop all
> #
> cmd guilt pop --all
> @@ -61,7 +72,7 @@ cmd guilt pop --all
>
> npatches=`guilt series | wc -l`
> for n in `_seq -2 $npatches`; do
> - if [ $n -ge 0 ]; then
> + if [ $n -gt 0 ]; then
> cmd guilt push -n $n
> else
> shouldfail guilt push -n $n
> --
> 1.8.3.1
>
--
Evolution, n.:
A hypothetical process whereby infinitely improbable events occur with
alarming frequency, order arises from chaos, and no one is given credit.