peer: add a `path` attribute to peer
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 03 Dec 2022 00:13:50 +0100
changeset 49864 611ccb631cbc
parent 49863 a6e2a668c746
child 49865 ff7134e03629
peer: add a `path` attribute to peer It will start being set in the coming changesets.
mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py	Sat Dec 03 00:00:41 2022 +0100
+++ b/mercurial/interfaces/repository.py	Sat Dec 03 00:13:50 2022 +0100
@@ -103,6 +103,7 @@
     """
 
     ui = interfaceutil.Attribute("""ui.ui instance""")
+    path = interfaceutil.Attribute("""a urlutil.path instance or None""")
 
     def url():
         """Returns a URL string representing this peer.
@@ -387,11 +388,9 @@
 
     limitedarguments = False
 
-    def __init__(
-        self,
-        ui,
-    ):
+    def __init__(self, ui, path=None):
         self.ui = ui
+        self.path = path
 
     def capable(self, name):
         caps = self.capabilities()