[Request] [+ ] D8579: context: avoid computing status twice when comparing among revisions
rom1dep (Romain DEP.)
phabricator at mercurial-scm.org
Mon May 25 06:48:24 UTC 2020
rom1dep created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8579
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1937,12 +1937,13 @@
building a new manifest if self (working directory) is not comparing
against its parent (repo['.']).
"""
- s = self._dirstatestatus(match, listignored, listclean, listunknown)
- # Filter out symlinks that, in the case of FAT32 and NTFS filesystems,
- # might have accidentally ended up with the entire contents of the file
- # they are supposed to be linking to.
- s.modified[:] = self._filtersuspectsymlink(s.modified)
- if other != self._repo[b'.']:
+ if other == self._repo[b'.']:
+ s = self._dirstatestatus(match, listignored, listclean, listunknown)
+ # Filter out symlinks that, in the case of FAT32 and NTFS filesystems,
+ # might have accidentally ended up with the entire contents of the file
+ # they are supposed to be linking to.
+ s.modified[:] = self._filtersuspectsymlink(s.modified)
+ else:
s = super(workingctx, self)._buildstatus(
other, s, match, listignored, listclean, listunknown
)
To: rom1dep, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200525/962440b4/attachment.html>
More information about the Mercurial-patches
mailing list