comparison mercurial/cmdutil.py @ 38946:f3f109971359

grep: add MULTIREV support to --allfiles flag This patch facilitates passing multiple revisions with all-files flag. It's assumed that if you are passing multiple revisions to --allfiles, you want hits from all of them. Differential Revision: https://phab.mercurial-scm.org/D3976
author Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
date Wed, 25 Jul 2018 12:50:31 +0530
parents 32ece991955c
children d99468d2b09a
comparison
equal deleted inserted replaced
38945:0dce1297dd01 38946:f3f109971359
1887 allfiles = opts.get('all_files') 1887 allfiles = opts.get('all_files')
1888 follow = opts.get('follow') or opts.get('follow_first') 1888 follow = opts.get('follow') or opts.get('follow_first')
1889 revs = _walkrevs(repo, opts) 1889 revs = _walkrevs(repo, opts)
1890 if not revs: 1890 if not revs:
1891 return [] 1891 return []
1892 if allfiles and len(revs) > 1:
1893 raise error.Abort(_("multiple revisions not supported with "
1894 "--all-files"))
1895 wanted = set() 1892 wanted = set()
1896 slowpath = match.anypats() or (not match.always() and opts.get('removed')) 1893 slowpath = match.anypats() or (not match.always() and opts.get('removed'))
1897 fncache = {} 1894 fncache = {}
1898 change = repo.__getitem__ 1895 change = repo.__getitem__
1899 1896