[PATCH default-bug-fix] revert: stop marking file as clean after iterative revert (issue4592)

Augie Fackler raf at durin42.com
Sat Apr 11 13:05:38 CDT 2015


On Sat, Apr 11, 2015 at 12:32:28PM -0400, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1428767649 14400
> #      Sat Apr 11 11:54:09 2015 -0400
> # Node ID 207e295aecc5bc8e728ec4c58674171167d034a5
> # Parent  52ff737c63d2b2cb41185549aa9c35bc47317032
> revert: stop marking file as clean after iterative revert (issue4592)

Queued with some copyediting on the log message, thanks.

>
> The goal of 'hg revert --interactive' is usually to keep some change in the
> revert file, so they -must-not- be marked as clean. We want the status logic to
> do his usual job here.
>
> For unclear reason (probably timing related), I was unable to build an automated
> test that reproduce issue4592 but manual test show this is fixed.
>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -3121,15 +3121,10 @@ def _performrevert(repo, parents, ctx, a
>              try:
>                  patch.internalpatch(repo.ui, repo, fp, 1, eolmode=None)
>              except patch.PatchError, err:
>                  raise util.Abort(str(err))
>          del fp
> -
> -        for f in actions['revert'][0]:
> -            if normal:
> -                normal(f)
> -
>      else:
>          for f in actions['revert'][0]:
>              checkout(f)
>              if normal:
>                  normal(f)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list