[PATCH 5 of 5] dispatch: exit with status 1 for an InterventionRequired exception (bc)

Mads Kiilerich mads at kiilerich.com
Sat Feb 9 05:45:27 CST 2013


On 02/08/2013 11:49 PM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf at durin42.com>
> # Date 1360361866 21600
> # Node ID f7f9b0475f5b74df861bdef1684bef8c976e4196
> # Parent  c74fa66f8dd73ce2bb11b359cbfc71d570af7533
> dispatch: exit with status 1 for an InterventionRequired exception (bc)

Exactly what will this change? From the tests it seems like it only will 
change from one 'not success' exit code to another?

And why this change? To be able to distinguish aborts from less fatal cases?

Shouldn't this be documented somewhere if it is a new reliable convention?

/Mads

> diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
> --- a/mercurial/dispatch.py
> +++ b/mercurial/dispatch.py
> @@ -153,6 +153,7 @@
>               commands.help_(ui, 'shortlist')
>       except error.InterventionRequired, inst:
>           ui.warn("%s\n" % inst)
> +        return 1
>       except util.Abort, inst:
>           ui.warn(_("abort: %s\n") % inst)
>           if inst.hint:
> diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
> --- a/tests/test-histedit-fold.t
> +++ b/tests/test-histedit-fold.t
> @@ -183,7 +183,7 @@
>     warning: conflicts during merge.
>     merging file incomplete! (edit conflicts, then use 'hg resolve --mark')
>     Fix up the change and run hg histedit --continue
> -  [255]
> +  [1]
>   There were conflicts, we keep P1 content. This
>   should effectively drop the changes from +6.
>     $ hg status
> @@ -248,7 +248,7 @@
>     warning: conflicts during merge.
>     merging file incomplete! (edit conflicts, then use 'hg resolve --mark')
>     Fix up the change and run hg histedit --continue
> -  [255]
> +  [1]
>     $ cat > file << EOF
>     > 1
>     > 2
>



More information about the Mercurial-devel mailing list