match: ignore "" patterns stable
authorMatt Mackall <mpm@selenic.com>
Fri, 04 Mar 2011 19:21:12 -0600
branchstable
changeset 13534 4ec34de8bbb1
parent 13531 67fbe566eff1
child 13535 0d3cce1de233
child 13541 919174c0aaff
match: ignore "" patterns The following command would visit every changeset in repo/ rather than the last 10: hg log -l 10 repo/
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Mar 04 14:00:49 2011 +0100
+++ b/mercurial/cmdutil.py	Fri Mar 04 19:21:12 2011 -0600
@@ -261,6 +261,8 @@
     return ret
 
 def match(repo, pats=[], opts={}, globbed=False, default='relpath'):
+    if pats == ("",):
+        pats = []
     if not globbed and default == 'relpath':
         pats = expandpats(pats or [])
     m = matchmod.match(repo.root, repo.getcwd(), pats,