[PATCH 2 of 3] update: allow branch crossing when clean
Gilles Moris
gilles.moris at free.fr
Thu Aug 20 16:36:47 CDT 2009
On Thu August 20 2009 07:57:45 Stuart W Marks wrote:
> --- a/mercurial/merge.py Wed Aug 19 21:30:32 2009 -0700
> +++ b/mercurial/merge.py Wed Aug 19 21:31:04 2009 -0700
> @@ -439,14 +439,8 @@
> elif not overwrite:
> if pa == p1 or pa == p2: # linear
> pass # all good
> - elif p1.branch() == p2.branch():
> - if wc.files() or wc.deleted():
> - raise util.Abort(_("crosses branches (use 'hg merge' or "
> - "'hg update -C' to discard changes)"))
> - raise util.Abort(_("crosses branches (use 'hg merge' "
> - "or 'hg update -C')"))
> elif wc.files() or wc.deleted():
> - raise util.Abort(_("crosses named branches (use "
> + raise util.Abort(_("crosses branches (use 'hg merge' or use "
> "'hg update -C' to discard changes)"))
> else:
> # Allow jumping branches if there are no changes
>
Thanks for taking my suggestion to this level of patch.
The code is simpler, and the usage will be less error prone.
I have no other comment than hoping this one will be pushed to crew soon.
Thanks.
Gilles.
More information about the Mercurial-devel
mailing list