comparison mercurial/sparse.py @ 41676:0531dff73d0b

match: delete unused root and cwd arguments from {always,never,exact}() (API) Differential Revision: https://phab.mercurial-scm.org/D5930
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 09 Feb 2019 22:50:53 -0800
parents ddbebce94665
children aaad36b88298
comparison
equal deleted inserted replaced
41675:ddbebce94665 41676:0531dff73d0b
275 275
276 ``includetemp`` indicates whether to use the temporary sparse profile. 276 ``includetemp`` indicates whether to use the temporary sparse profile.
277 """ 277 """
278 # If sparse isn't enabled, sparse matcher matches everything. 278 # If sparse isn't enabled, sparse matcher matches everything.
279 if not enabled: 279 if not enabled:
280 return matchmod.always(repo.root, '') 280 return matchmod.always()
281 281
282 if not revs or revs == [None]: 282 if not revs or revs == [None]:
283 revs = [repo.changelog.rev(node) 283 revs = [repo.changelog.rev(node)
284 for node in repo.dirstate.parents() if node != nullid] 284 for node in repo.dirstate.parents() if node != nullid]
285 285
303 matchers.append(matcher) 303 matchers.append(matcher)
304 except IOError: 304 except IOError:
305 pass 305 pass
306 306
307 if not matchers: 307 if not matchers:
308 result = matchmod.always(repo.root, '') 308 result = matchmod.always()
309 elif len(matchers) == 1: 309 elif len(matchers) == 1:
310 result = matchers[0] 310 result = matchers[0]
311 else: 311 else:
312 result = matchmod.unionmatcher(matchers) 312 result = matchmod.unionmatcher(matchers)
313 313