D8071: copies: avoid filtering by short-circuit dirstate-only copies earlier
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Feb 6 22:22:20 UTC 2020
Closed by commit rHG30862e226339: copies: avoid filtering by short-circuit dirstate-only copies earlier (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8071?vs=19873&id=19976
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8071/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8071
AFFECTED FILES
mercurial/copies.py
tests/test-repo-filters-tiptoe.t
CHANGE DETAILS
diff --git a/tests/test-repo-filters-tiptoe.t b/tests/test-repo-filters-tiptoe.t
--- a/tests/test-repo-filters-tiptoe.t
+++ b/tests/test-repo-filters-tiptoe.t
@@ -68,7 +68,6 @@
! b
$ hg status --copies
- debug.filters: computing revision filter for "visible"
M c
A d
R a
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -403,13 +403,15 @@
)
if x == y or not x or not y:
return {}
+ if y.rev() is None and x == y.p1():
+ if debug:
+ repo.ui.debug(b'debug.copies: search mode: dirstate\n')
+ # short-circuit to avoid issues with merge states
+ return _dirstatecopies(repo, match)
a = y.ancestor(x)
if a == x:
if debug:
repo.ui.debug(b'debug.copies: search mode: forward\n')
- if y.rev() is None and x == y.p1():
- # short-circuit to avoid issues with merge states
- return _dirstatecopies(repo, match)
copies = _forwardcopies(x, y, match=match)
elif a == y:
if debug:
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list