comparison mercurial/changegroup.py @ 41673:1db5ae4b0dda

cleanup: prefer matchmod.{always,never}() over accessing matchers directly We have these factory methods so we should use them. Differential Revision: https://phab.mercurial-scm.org/D5927
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 10 Feb 2019 14:16:37 -0800
parents fa7d61f9c512
children 0531dff73d0b
comparison
equal deleted inserted replaced
41672:c302218a2528 41673:1db5ae4b0dda
1311 matcher=None, ellipses=False, shallow=False, 1311 matcher=None, ellipses=False, shallow=False,
1312 ellipsisroots=None, fullnodes=None): 1312 ellipsisroots=None, fullnodes=None):
1313 assert version in supportedoutgoingversions(repo) 1313 assert version in supportedoutgoingversions(repo)
1314 1314
1315 if matcher is None: 1315 if matcher is None:
1316 matcher = matchmod.alwaysmatcher(repo.root, '') 1316 matcher = matchmod.always(repo.root, '')
1317 if oldmatcher is None: 1317 if oldmatcher is None:
1318 oldmatcher = matchmod.nevermatcher(repo.root, '') 1318 oldmatcher = matchmod.never(repo.root, '')
1319 1319
1320 if version == '01' and not matcher.always(): 1320 if version == '01' and not matcher.always():
1321 raise error.ProgrammingError('version 01 changegroups do not support ' 1321 raise error.ProgrammingError('version 01 changegroups do not support '
1322 'sparse file matchers') 1322 'sparse file matchers')
1323 1323