diff hgext/schemes.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 e77cee5de1c7
children e637dc0b3b1f
line wrap: on
line diff
--- a/hgext/schemes.py	Sat Apr 14 09:23:48 2018 -0700
+++ b/hgext/schemes.py	Sat Apr 14 09:57:44 2018 -0700
@@ -78,9 +78,9 @@
     def __repr__(self):
         return '<ShortRepository: %s>' % self.scheme
 
-    def instance(self, ui, url, create):
+    def instance(self, ui, url, create, intents=None):
         url = self.resolve(url)
-        return hg._peerlookup(url).instance(ui, url, create)
+        return hg._peerlookup(url).instance(ui, url, create, intents=intents)
 
     def resolve(self, url):
         # Should this use the util.url class, or is manual parsing better?