diff mercurial/statichttprepo.py @ 37717:0664be4f0c1f

hg: pass command intents to repo/peer creation (API) The previous commit introduced a mechanism to declare command intents. This commit changes the repository and peer instantiation mechanism so the intents are passed down to each repository and peer type so they can do with them whatever they please. Currently, nobody does anything with any intent. Differential Revision: https://phab.mercurial-scm.org/D3377
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 14 Apr 2018 09:57:44 -0700
parents 214f61abd865
children 089fc0db0954
line wrap: on
line diff
--- a/mercurial/statichttprepo.py	Sat Apr 14 09:23:48 2018 -0700
+++ b/mercurial/statichttprepo.py	Sat Apr 14 09:57:44 2018 -0700
@@ -215,7 +215,7 @@
     def _writecaches(self):
         pass # statichttprepository are read only
 
-def instance(ui, path, create):
+def instance(ui, path, create, intents=None):
     if create:
         raise error.Abort(_('cannot create new static-http repository'))
     return statichttprepository(ui, path[7:])