[PATCH 05 of 11] copies: don't record divergence for files needing no merge (issue4028)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Oct 4 13:28:21 EDT 2016



On 10/04/2016 04:39 PM, Gábor Stefanik wrote:
> # HG changeset patch
> # User Gábor Stefanik <gabor.stefanik at nng.com>
> # Date 1475494199 -7200
> #      Mon Oct 03 13:29:59 2016 +0200
> # Node ID bc8729a69d10d61498712d5dab773918f1edcde0
> # Parent  a2b50d0c5dc69a4ce15b6a54d030e478c0f4cc41
> copies: don't record divergence for files needing no merge (issue4028)

Can you elaborate about why this change make sense ?

also: do not include (issue4028) tag until the changeset that actually 
fixes the issue.

>
> diff -r a2b50d0c5dc6 -r bc8729a69d10 mercurial/copies.py
> --- a/mercurial/copies.py	Mon Oct 03 13:24:56 2016 +0200
> +++ b/mercurial/copies.py	Mon Oct 03 13:29:59 2016 +0200
> @@ -524,13 +524,12 @@
>          if of not in m2:
>              continue # no match, keep looking
>          if m2[of] == ma.get(of):
> -            break # no merge needed, quit early
> +            return # no merge needed, quit early
>          c2 = getfctx(of, m2[of])
>          cr = _related(oc, c2, ca.rev())
>          if cr and (of == f or of == c2.path()): # non-divergent
>              copy[f] = of
> -            of = None
> -            break
> +            return
>
>      if of in ma:
>          diverge.setdefault(of, []).append(f)
>
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list