changeset 30777:5d1f149c28c3 draft

files: glob patterns by default (BC) Since this is a purely informative command, it seems safe and useful to make globbing the default behaviour.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 19 Aug 2015 13:27:42 -0400
parents b19c2679289c
children
files mercurial/commands.py tests/test-treemanifest.t
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4039,7 +4039,7 @@
         end = '\0'
     fmt = '%s' + end
 
-    m = scmutil.match(ctx, pats, opts)
+    m = scmutil.match(ctx, pats, opts, default='glob')
     with ui.formatter('files', opts) as fm:
         return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos'))
 
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -825,3 +825,7 @@
   added 1 changesets with 1 changes to 1 files (+1 heads)
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
+
+Test that globbing is the default
+
+  $ hg files -r . **.txt -I path:b/bar -X path:b/bar/orange