Submitter | phabricator |
---|---|
Date | Oct. 16, 2017, 7:01 p.m. |
Message ID | <differential-rev-PHID-DREV-vwnawqsvprk45xnrfu5c-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/25029/ |
State | Superseded |
Headers | show |
Comments
ryanmce added a comment. Hm, check-code is failing here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1122 To: phillco, #hg-reviewers, durin42 Cc: ryanmce, mercurial-devel
ryanmce added a comment. I'm dropping this from hg-committed for now. Please re-submit with the check-code issues fixed. @hg-reviewers: If I'm doing this wrong by dropping the patch, please let me know so I can correct my behavior in the future. INLINE COMMENTS > test-arbitraryfilectx.t:53 > + $ hg eval "context.arbitraryfilectx('real_A', repo).cmp(repo[None]['sym_A'])" > + False (no-e ol) > + why is there a space after the e here? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1122 To: phillco, #hg-reviewers, durin42 Cc: ryanmce, mercurial-devel
durin42 added a comment. No, that sounds fair, Phil should resend (as a new differential ID) when the issue is sorted. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1122 To: phillco, #hg-reviewers, durin42 Cc: ryanmce, mercurial-devel
phillco added a comment. Whoops, sorry, I forgot to run tests on the most recent version. Will fix & resend. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1122 To: phillco, #hg-reviewers, durin42 Cc: ryanmce, mercurial-devel
phillco added a comment. I've sent https://phab.mercurial-scm.org/D1165, which is the corrected version. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1122 To: phillco, #hg-reviewers, durin42 Cc: ryanmce, mercurial-devel
Patch
diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -2561,7 +2561,10 @@ self._path = path def cmp(self, fctx): - if isinstance(fctx, workingfilectx) and self._repo: + # filecmp follows symlinks whereas `cmp` should not, so skip the fast + # path if either side is a symlink. + symlinks = ('l' in self.flags() or 'l' in fctx.flags()) + if isinstance(fctx, workingfilectx) and self._repo and not symlinks: # Add a fast-path for merge if both sides are disk-backed. # Note that filecmp uses the opposite return values as cmp. return not filecmp.cmp(self.path(), self._repo.wjoin(fctx.path()))