diff mercurial/commands.py @ 4190:e8ee8fdeddb1

change locate to use relglobs by default This makes its default behaviour useful again (issue108), and changes it search the entire repository by default (instead of just the cwd), just like all other commands. It also hides issue204 by default, but you'll still see the same behaviour if you give it a relpath: pattern.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:57 -0300
parents a2335e832e16
children 1c69c73d85d9
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1602,9 +1602,8 @@ def locate(ui, repo, *pats, **opts):
     Print all files under Mercurial control whose names match the
     given patterns.
 
-    This command searches the current directory and its
-    subdirectories.  To search an entire repository, move to the root
-    of the repository.
+    This command searches the entire repository by default.  To search
+    just the current directory and its subdirectories, use "--include .".
 
     If no patterns are given to match, this command prints all file
     names.
@@ -1622,7 +1621,7 @@ def locate(ui, repo, *pats, **opts):
         node = None
 
     for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node,
-                                             head='(?:.*/|)'):
+                                             default='relglob'):
         if not node and repo.dirstate.state(abs) == '?':
             continue
         if opts['fullpath']: