comparison mercurial/hg.py @ 49806:c4731eee1c8f

peer-or-repo: remove the now unused function We do not need it anymore.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 29 Nov 2022 22:22:18 +0100
parents ebb5e38fdafc
children 1470a533d28a
comparison
equal deleted inserted replaced
49805:ebb5e38fdafc 49806:c4731eee1c8f
188 return url.open(ui, path, sendaccept=sendaccept) 188 return url.open(ui, path, sendaccept=sendaccept)
189 189
190 190
191 # a list of (ui, repo) functions called for wire peer initialization 191 # a list of (ui, repo) functions called for wire peer initialization
192 wirepeersetupfuncs = [] 192 wirepeersetupfuncs = []
193
194
195 def _peerorrepo(
196 ui, path, create=False, presetupfuncs=None, intents=None, createopts=None
197 ):
198 """return a repository object for the specified path"""
199 cls = _peerlookup(path)
200 obj = cls.instance(ui, path, create, intents=intents, createopts=createopts)
201 _setup_repo_or_peer(ui, obj, presetupfuncs)
202 return obj
203 193
204 194
205 def _setup_repo_or_peer(ui, obj, presetupfuncs=None): 195 def _setup_repo_or_peer(ui, obj, presetupfuncs=None):
206 ui = getattr(obj, "ui", ui) 196 ui = getattr(obj, "ui", ui)
207 for f in presetupfuncs or []: 197 for f in presetupfuncs or []: