[PATCH stable] update: shorten abort message for updating across branches when unclean

Henrik Stuart hg at hstuart.dk
Mon Nov 30 23:34:00 CST 2009


Stuart W Marks wrote:
> # HG changeset patch
> # User Stuart W Marks <smarks at smarks.org>
> # Date 1259644368 28800
> # Node ID d83d2ede9f37e312a5a6a143dd244dcef74494ba
> # Parent  2e67734e1453e44de0816c3f562005e89c09c21f
> update: shorten abort message for updating across branches when unclean
> 
> The old message is too long, as it wraps across lines. Shorten it to
> fit onto a single line. Minor tweaks to merge.update() docstring.

[...]

> @@ -474,8 +473,8 @@
>              if pa == p1 or pa == p2: # linear
>                  pass # all good
>              elif wc.files() or wc.deleted():
> -                raise util.Abort(_("crosses branches (use 'hg merge' to merge "
> -                                 "or use 'hg update -C' to discard changes)"))
> +                raise util.Abort(_("can't cross branches when there are "
> +                                   "uncommitted changes"))
>              elif onode is None:
>                  raise util.Abort(_("crosses branches (use 'hg merge' or use "
>                                     "'hg update -c')"))

In my experience, most people need a bit more hand-holding than what the
revised message offers. I know that condensing the message to a single
line is non-trivial, but mentioning the way to discard changes seems
like a good idea.

-- 
Kind regards,
  Henrik Stuart


More information about the Mercurial-devel mailing list