D7135: copies: filter out file already in parent in duplicatecopies()
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat Oct 19 01:09:40 EDT 2019
yuja added a comment.
> - a/tests/test-issue1175.t
>
> +++ b/tests/test-issue1175.t
> @@ -82,7 +82,6 @@
>
> continue: hg graft --continue
> $ hg graft --continue
> grafting 1:5974126fad84 "b1"
>
> - warning: can't find ancestor for 'b' copied from 'a'! $ hg log -f b -T 'changeset: {rev}:{node|short}\nsummary: {desc}\n\n' changeset: 3:376d30ccffc0 summary: b1
This test was added at a43fdf33a6be <https://phab.mercurial-scm.org/rHGa43fdf33a6beb697945a3dbb7253f0436ea278a6>, which might need bad copy information.
> - a/mercurial/copies.py
>
> +++ b/mercurial/copies.py
> @@ -810,10 +810,11 @@
>
> 1. of the function is much faster (and is required for carrying copy
> 2. metadata across the rebase anyway). exclude = pathcopies(repo[fromrev], repo[skiprev])
>
> + pctx = wctx.p1()
>
> for dst, src in pycompat.iteritems(pathcopies(repo[fromrev], repo[rev])):
> if dst in exclude:
> continue
>
> - if dst in wctx:
>
> + if dst in wctx and dst not in pctx:
>
> wctx[dst].markcopied(src)
Seems fine as we don't support `hg rm b; hg cp a b` case.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7135/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7135
To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list