mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
copies: check if the file is in source commit
Summary: Check if the file is in source commit. Currently, dagcopytrace assume the source file is in the source commit Reviewed By: sggutier Differential Revision: D47056956 fbshipit-source-id: db4de51be66d26b01d239c0d6023b154578cddf8
This commit is contained in:
parent
3b78ae1e7e
commit
21ac2090f7
@ -929,8 +929,12 @@ def duplicatecopies(repo, wctx, rev, fromrev, skiprev=None):
|
||||
"""
|
||||
dagcopytrace = _get_dagcopytrace(repo, wctx, skiprev)
|
||||
for dst, src in pycompat.iteritems(pathcopies(repo[fromrev], repo[rev])):
|
||||
if dagcopytrace and dagcopytrace.trace_rename(
|
||||
repo[skiprev].node(), repo[fromrev].node(), dst
|
||||
if (
|
||||
dagcopytrace
|
||||
and dst in repo[skiprev]
|
||||
and dagcopytrace.trace_rename(
|
||||
repo[skiprev].node(), repo[fromrev].node(), dst
|
||||
)
|
||||
):
|
||||
continue
|
||||
wctx[dst].markcopied(src)
|
||||
|
@ -5,6 +5,7 @@ Test for the full copytracing algorithm
|
||||
=======================================
|
||||
|
||||
$ eagerepo
|
||||
$ setconfig copytrace.skipduplicatecopies=True
|
||||
|
||||
$ newclientrepo t
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user