diff mercurial/debugcommands.py @ 38805:b9162ea1b815

fileset: extract language processing part to new module (API) I'll add a couple more functions that work on parsed tree. % wc -l mercurial/fileset*.py 559 mercurial/fileset.py 135 mercurial/filesetlang.py 694 total
author Yuya Nishihara <yuya@tcha.org>
date Sun, 22 Jul 2018 15:50:45 +0900
parents f0a574dbfae9
children 96b2e66dfa74
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Sat Jul 21 15:23:56 2018 +0900
+++ b/mercurial/debugcommands.py	Sun Jul 22 15:50:45 2018 +0900
@@ -48,7 +48,7 @@
     exchange,
     extensions,
     filemerge,
-    fileset,
+    filesetlang,
     formatter,
     hg,
     httppeer,
@@ -916,13 +916,13 @@
                 raise error.Abort(_('invalid stage name: %s') % n)
         showalways.update(opts['show_stage'])
 
-    tree = fileset.parse(expr)
+    tree = filesetlang.parse(expr)
     for n, f in stages:
         tree = f(tree)
         if n in showalways:
             if opts['show_stage'] or n != 'parsed':
                 ui.write(("* %s:\n") % n)
-            ui.write(fileset.prettyformat(tree), "\n")
+            ui.write(filesetlang.prettyformat(tree), "\n")
 
     files = set()
     if opts['all_files']: