Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 38972:4d992e3f10ba
debugcommands: force import of fileset in debugfileset
It looks like Python 3's lazy importer is better than Python 2's for
this command, and as a result we had no symbols in the filesetlang
symbol table, which resulted in some really mysterious test-fileset.t
failures around withstatus optimizations. Inserting this explicit
import and forcing its evaluation fixes the test failure.
Differential Revision: https://phab.mercurial-scm.org/D4172
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 09 Aug 2018 11:56:24 -0400 |
parents | 7e7e2b2ff284 |
children | efeeb73f54c3 |
comparison
equal
deleted
inserted
replaced
38971:ee97f7a677f3 | 38972:4d992e3f10ba |
---|---|
894 ('p', 'show-stage', [], | 894 ('p', 'show-stage', [], |
895 _('print parsed tree at the given stage'), _('NAME'))], | 895 _('print parsed tree at the given stage'), _('NAME'))], |
896 _('[-r REV] [--all-files] [OPTION]... FILESPEC')) | 896 _('[-r REV] [--all-files] [OPTION]... FILESPEC')) |
897 def debugfileset(ui, repo, expr, **opts): | 897 def debugfileset(ui, repo, expr, **opts): |
898 '''parse and apply a fileset specification''' | 898 '''parse and apply a fileset specification''' |
899 from . import fileset | |
900 fileset.symbols # force import of fileset so we have predicates to optimize | |
899 opts = pycompat.byteskwargs(opts) | 901 opts = pycompat.byteskwargs(opts) |
900 ctx = scmutil.revsingle(repo, opts.get('rev'), None) | 902 ctx = scmutil.revsingle(repo, opts.get('rev'), None) |
901 | 903 |
902 stages = [ | 904 stages = [ |
903 ('parsed', pycompat.identity), | 905 ('parsed', pycompat.identity), |