[PATCH] update: when failing to merge, mention how to abandon the update (issue1431)

Gilles Moris gilles.moris at free.fr
Sun Feb 20 02:34:00 CST 2011


On Sunday 20 February 2011 06:59:26 am Brodie Rao wrote:
> # HG changeset patch
> # User Brodie Rao <brodie at bitheap.org>
> # Date 1298181399 28800
> # Node ID a8fc9b1309a82eaea2a0454809678c8d53df9d48
> # Parent  643b8212813e631b5525049fc4321a34a4def105
> update: when failing to merge, mention how to abandon the update
> (issue1431)
>
> Prior to the resolve command being added in 92ccccb55ba3, hg update
> printed a similar message explaining how to retry the update.
>
> diff --git a/mercurial/hg.py b/mercurial/hg.py
> --- a/mercurial/hg.py
> +++ b/mercurial/hg.py
> @@ -378,10 +378,12 @@ def _showstats(repo, stats):
>  
>  def update(repo, node):
>      """update the working directory to node, merging linear changes"""
> +    pl = repo.parents()
>      stats = mergemod.update(repo, node, False, False, None)
>      _showstats(repo, stats)
>      if stats[3]:
> -        repo.ui.status(_("use 'hg resolve' to retry unresolved file
> merges\n")) +        repo.ui.status(_("use 'hg resolve' to retry unresolved
> file merges " +                         "or 'hg update %s' to abandon\n") %
> pl[0].rev())

You mean: "hg update --clean ."

Regards.
Gilles.


More information about the Mercurial-devel mailing list