Mercurial > hgsubversion
comparison hgsubversion/svnrepo.py @ 1583:f778fdd82c83
svnrepo: preserve and forward createopts kwarg
This patch adds some if-elses to make sure we don't pass intent or createopts to
a httppeer.instance() which does not know about that i.e. we don't pass them
when hg is old.
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Wed, 24 Oct 2018 15:18:55 +0300 |
parents | 0d18108ec153 |
children | 4889843a704e |
comparison
equal
deleted
inserted
replaced
1582:e15dc9e9cd56 | 1583:f778fdd82c83 |
---|---|
242 raise NotImplementedError | 242 raise NotImplementedError |
243 | 243 |
244 def debugwireargs(self): | 244 def debugwireargs(self): |
245 raise NotImplementedError | 245 raise NotImplementedError |
246 | 246 |
247 def instance(ui, url, create, intents=None): | 247 def instance(ui, url, create, intents=None, createopts=None): |
248 if url.startswith('http://') or url.startswith('https://'): | 248 if url.startswith('http://') or url.startswith('https://'): |
249 try: | 249 try: |
250 # may yield a bogus 'real URL...' message | 250 # may yield a bogus 'real URL...' message |
251 return httppeer.instance(ui, url, create, intents=intents) | 251 if createopts: |
252 # intents arg is present is createopts is present | |
253 return httppeer.instance(ui, url, create, intents=intents, | |
254 createopts=createopts) | |
255 elif intents: | |
256 return httppeer.instance(ui, url, create, intents=intents) | |
257 else: | |
258 # intents and createopts not passed, lets be safe and assume | |
259 # that mercurial does not know about them | |
260 return httppeer.instance(ui, url, create) | |
252 except error.RepoError: | 261 except error.RepoError: |
253 ui.traceback() | 262 ui.traceback() |
254 ui.note('(falling back to Subversion support)\n') | 263 ui.note('(falling back to Subversion support)\n') |
255 | 264 |
256 if create: | 265 if create: |