D1165: arbitraryfilecontext: skip the cmp fast path if any side is a symlink
ryanmce (Ryan McElroy)
phabricator at mercurial-scm.org
Tue Oct 17 21:57:59 UTC 2017
ryanmce accepted this revision.
ryanmce added a comment.
This revision is now accepted and ready to land.
queued
INLINE COMMENTS
> context.py:2578
> + # Note that filecmp uses the opposite return values (True if same)
> + # as our ``cmp`` functions (True if different).
> return not filecmp.cmp(self.path(), self._repo.wjoin(fctx.path()))
I will remove the backticks in-flight; I think this are discouraged in comments still
Excellent comment overall, nonetheless
> test-arbitraryfilectx.t:4-5
> + > from __future__ import absolute_import
> + > from mercurial import context, commands, registrar
> + > import filecmp
> + > cmdtable = {}
--- /data/users/rmcelroy/mercurial/hg/tests/test-check-module-imports.t
+++ /data/users/rmcelroy/mercurial/hg/tests/test-check-module-imports.t.err
@@ -42,3 +42,6 @@
> -X tests/test-lock.py \
> -X tests/test-verify-repo-operations.py \
> | sed 's-\\-/-g' | $PYTHON "$import_checker" -
+ tests/test-arbitraryfilectx.t:4: imports from mercurial not lexically sorted: commands < context
+ tests/test-arbitraryfilectx.t:5: stdlib import "filecmp" follows local import: mercurial
+ [1]
I can fix this in flight. Are you running all the `test-check-*.t` tests locally?
> test-arbitraryfilectx.t:8-13
> + > @command(b'eval', [], 'hg eval CMD')
> + > def eval_(ui, repo, *cmds, **opts):
> + > cmd = " ".join(cmds)
> + > res = str(eval(cmd, globals(), locals()))
> + > ui.warn("%s" % res)
> + > EOF
What a terrible, evil extension!
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1165
To: phillco, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
More information about the Mercurial-devel
mailing list