This revision was automatically updated to reflect the committed changes.
Closed by commit rHGffd08ec22955: grep: rename --allfiles to --all-files 
(authored by yuja, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3915?vs=9532&id=9545

REVISION DETAIL
  https://phab.mercurial-scm.org/D3915

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/commands.py
  tests/test-completion.t
  tests/test-grep.t

CHANGE DETAILS

diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -409,7 +409,7 @@
   adding new
   $ hg grep -r "." "unmod"
   [1]
-  $ hg grep -r "." "unmod" --allfiles
+  $ hg grep -r "." "unmod" --all-files
   um:1:unmod
 
   $ cd ..
diff --git a/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -313,7 +313,7 @@
   debugwireproto: localssh, peer, noreadstderr, nologhandshake, ssh, 
remotecmd, insecure
   files: rev, print0, include, exclude, template, subrepos
   graft: rev, continue, stop, abort, edit, log, no-commit, force, currentdate, 
currentuser, date, user, tool, dry-run
-  grep: print0, all, diff, text, follow, ignore-case, files-with-matches, 
line-number, rev, allfiles, user, date, template, include, exclude
+  grep: print0, all, diff, text, follow, ignore-case, files-with-matches, 
line-number, rev, all-files, user, date, template, include, exclude
   heads: rev, topo, active, closed, style, template
   help: extension, command, keyword, system
   identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, 
template
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2501,7 +2501,7 @@
     ('n', 'line-number', None, _('print matching line numbers')),
     ('r', 'rev', [],
      _('only search files changed within revision range'), _('REV')),
-    ('', 'allfiles', False,
+    ('', 'all-files', False,
      _('include all files in the changeset while grepping (EXPERIMENTAL)')),
     ('u', 'user', None, _('list the author (long with -v)')),
     ('d', 'date', None, _('list the date (short with -q)')),
@@ -2547,7 +2547,7 @@
 
     if not opts.get('rev') and not diff:
         opts['rev'] = ["wdir()"]
-        opts['allfiles'] = True
+        opts['all_files'] = True
 
     getfile = util.lrucachefunc(repo.file)
 
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1879,13 +1879,14 @@
     yielding each context, the iterator will first call the prepare
     function on each context in the window in forward order.'''
 
-    allfiles = opts.get('allfiles')
+    allfiles = opts.get('all_files')
     follow = opts.get('follow') or opts.get('follow_first')
     revs = _walkrevs(repo, opts)
     if not revs:
         return []
     if allfiles and len(revs) > 1:
-        raise error.Abort(_("multiple revisions not supported with 
--allfiles"))
+        raise error.Abort(_("multiple revisions not supported with "
+                            "--all-files"))
     wanted = set()
     slowpath = match.anypats() or (not match.always() and opts.get('removed'))
     fncache = {}



To: yuja, #hg-reviewers, pulkit
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to