[Updated] D11964: filelog: add a comment explaining a fast path in filerevisioncopied()
SimonSapin
phabricator at mercurial-scm.org
Fri Jan 7 09:54:09 UTC 2022
Closed by commit rHG5026a0d37526: filelog: add a comment explaining a fast path in filerevisioncopied() (authored by SimonSapin).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11964?vs=31604&id=31617
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11964/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11964
AFFECTED FILES
mercurial/utils/storageutil.py
CHANGE DETAILS
diff --git a/mercurial/utils/storageutil.py b/mercurial/utils/storageutil.py
--- a/mercurial/utils/storageutil.py
+++ b/mercurial/utils/storageutil.py
@@ -112,6 +112,13 @@
2-tuple of the source filename and node.
"""
if store.parents(node)[0] != sha1nodeconstants.nullid:
+ # When creating a copy or move we set filelog parents to null,
+ # because contents are probably unrelated and making a delta
+ # would not be useful.
+ # Conversely, if filelog p1 is non-null we know
+ # there is no copy metadata.
+ # In the presence of merges, this reasoning becomes invalid
+ # if we reorder parents. See tests/test-issue6528.t.
return False
meta = parsemeta(store.revision(node))[0]
To: SimonSapin, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220107/90151f37/attachment-0002.html>
More information about the Mercurial-patches
mailing list