>

--------------------------------------------------------------------------
This message, including its attachments, is confidential. For more information 
please read NNG's email policy here:
http://www.nng.com/emailpolicy/
By responding to this email you accept the email policy.


-----Original Message-----
> From: Mercurial-devel [mailto:mercurial-devel-boun...@mercurial-scm.org]
> On Behalf Of Gábor Stefanik
> Sent: Sunday, October 16, 2016 5:16 PM
> To: mercurial-devel@mercurial-scm.org
> Subject: [PATCH 12 of 12 v2] update: enable copy tracing for backwards and
> non-linear updates
>
> # HG changeset patch
> # User Gábor Stefanik <gabor.stefa...@nng.com> # Date 1472155346 -7200
> #      Thu Aug 25 22:02:26 2016 +0200
> # Node ID 066dc1a5c8f4c9dfb582543bff5df8bbeba9cc31
> # Parent  a3a36d782f4d4252adb9069eb37149999f946881
> update: enable copy tracing for backwards and non-linear updates
>
> As a followup to the issue4028 series, this fixes a variant of the issue that 
> can
> occur when updating with uncommited local changes.
>

There will be another version of this patch soon, with an additional test and
more detailed explanation.

> diff -r a3a36d782f4d -r 066dc1a5c8f4 mercurial/merge.py
> --- a/mercurial/merge.pyTue Oct 11 04:39:47 2016 +0200
> +++ b/mercurial/merge.pyThu Aug 25 22:02:26 2016 +0200
> @@ -1537,15 +1537,16 @@
>                      pas = [p1]
>
>          # deprecated config: merge.followcopies
> -        followcopies = False
> +        followcopies = repo.ui.configbool('merge', 'followcopies',
> + True)
>          if overwrite:
>              pas = [wc]
> +            followcopies = False
>          elif pas == [p2]: # backwards
> -            pas = [wc.p1()]
> -        elif not branchmerge and not wc.dirty(missing=True):
> -            pass
> -        elif pas[0] and repo.ui.configbool('merge', 'followcopies', True):
> -            followcopies = True
> +            pas = [p1]
> +        elif not pas[0]:
> +            followcopies = False
> +        if not branchmerge and not wc.dirty(missing=True):
> +            followcopies = False
>
>          ### calculate phase
>          actionbyfile, diverge, renamedelete = calculateupdates( diff -r
> a3a36d782f4d -r 066dc1a5c8f4 tests/test-merge-local.t
> --- a/tests/test-merge-local.tTue Oct 11 04:39:47 2016 +0200
> +++ b/tests/test-merge-local.tThu Aug 25 22:02:26 2016 +0200
> @@ -66,7 +66,7 @@
>    merging zzz1_merge_ok
>    merging zzz2_merge_bad
>    warning: conflicts while merging zzz2_merge_bad! (edit, then use 'hg
> resolve --mark')
> -  2 files updated, 1 files merged, 3 files removed, 1 files unresolved
> +  2 files updated, 1 files merged, 2 files removed, 1 files unresolved
>    use 'hg resolve' to retry unresolved file merges
>    [1]
>
> @@ -104,7 +104,7 @@
>    merging zzz1_merge_ok
>    merging zzz2_merge_bad
>    warning: conflicts while merging zzz2_merge_bad! (edit, then use 'hg
> resolve --mark')
> -  2 files updated, 1 files merged, 3 files removed, 1 files unresolved
> +  2 files updated, 1 files merged, 2 files removed, 1 files unresolved
>    use 'hg resolve' to retry unresolved file merges
>    [1]
>
> diff -r a3a36d782f4d -r 066dc1a5c8f4 tests/test-mq-subrepo.t
> --- a/tests/test-mq-subrepo.tTue Oct 11 04:39:47 2016 +0200
> +++ b/tests/test-mq-subrepo.tThu Aug 25 22:02:26 2016 +0200
> @@ -304,6 +304,7 @@
>    record this change to '.hgsub'? [Ynesfdaq?] y
>
>    warning: subrepo spec file '.hgsub' not found
> +  warning: subrepo spec file '.hgsub' not found
>    abort: uncommitted changes in subrepository 'sub'
>    [255]
>    % update substate when adding .hgsub w/clean updated subrepo @@ -
> 319,6 +320,7 @@
>    record this change to '.hgsub'? [Ynesfdaq?] y
>
>    warning: subrepo spec file '.hgsub' not found
> +  warning: subrepo spec file '.hgsub' not found
>    path sub
>     source   sub
>     revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
> diff -r a3a36d782f4d -r 066dc1a5c8f4 tests/test-up-local-change.t
> --- a/tests/test-up-local-change.tTue Oct 11 04:39:47 2016 +0200
> +++ b/tests/test-up-local-change.tThu Aug 25 22:02:26 2016 +0200
> @@ -67,6 +67,10 @@
>    summary:     2
>
>    $ hg --debug up 0
> +  starting 4 threads for background file closing (?)
> +    searching for copies back to rev 0
> +    unmatched files in local (from topological common ancestor):
> +     b
>    resolving manifests
>     branchmerge: False, force: False, partial: False
>     ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to