comparison mercurial/scmutil.py @ 41666:a950b65cbe1b

scmutil: remove special handling of pats==("",) in matchandpats() (API) I don't know under what circumstances we used to pass that value, but we don't seem to do it now. Differential Revision: https://phab.mercurial-scm.org/D5921
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 09 Feb 2019 14:37:58 -0800
parents 0ed7a8ac5711
children 0531dff73d0b
comparison
equal deleted inserted replaced
41665:0ed7a8ac5711 41666:a950b65cbe1b
793 def matchandpats(ctx, pats=(), opts=None, globbed=False, default='relpath', 793 def matchandpats(ctx, pats=(), opts=None, globbed=False, default='relpath',
794 badfn=None): 794 badfn=None):
795 '''Return a matcher and the patterns that were used. 795 '''Return a matcher and the patterns that were used.
796 The matcher will warn about bad matches, unless an alternate badfn callback 796 The matcher will warn about bad matches, unless an alternate badfn callback
797 is provided.''' 797 is provided.'''
798 if pats == ("",):
799 pats = []
800 if opts is None: 798 if opts is None:
801 opts = {} 799 opts = {}
802 if not globbed and default == 'relpath': 800 if not globbed and default == 'relpath':
803 pats = expandpats(pats or []) 801 pats = expandpats(pats or [])
804 802