Show More
@@ -19,8 +19,8 b' def wraprepo(repo):' | |||||
19 | dirstate = super(narrowrepository, self)._makedirstate() |
|
19 | dirstate = super(narrowrepository, self)._makedirstate() | |
20 | return narrowdirstate.wrapdirstate(self, dirstate) |
|
20 | return narrowdirstate.wrapdirstate(self, dirstate) | |
21 |
|
21 | |||
22 | def peer(self): |
|
22 | def peer(self, path=None): | |
23 | peer = super(narrowrepository, self).peer() |
|
23 | peer = super(narrowrepository, self).peer(path=path) | |
24 | peer._caps.add(wireprototypes.NARROWCAP) |
|
24 | peer._caps.add(wireprototypes.NARROWCAP) | |
25 | peer._caps.add(wireprototypes.ELLIPSESCAP) |
|
25 | peer._caps.add(wireprototypes.ELLIPSESCAP) | |
26 | return peer |
|
26 | return peer |
@@ -458,8 +458,8 b' class bundlerepository:' | |||||
458 | def cancopy(self): |
|
458 | def cancopy(self): | |
459 | return False |
|
459 | return False | |
460 |
|
460 | |||
461 | def peer(self): |
|
461 | def peer(self, path=None): | |
462 | return bundlepeer(self) |
|
462 | return bundlepeer(self, path=path) | |
463 |
|
463 | |||
464 | def getcwd(self): |
|
464 | def getcwd(self): | |
465 | return encoding.getcwd() # always outside the repo |
|
465 | return encoding.getcwd() # always outside the repo |
@@ -1612,7 +1612,7 b' class ilocalrepositorymain(interfaceutil' | |||||
1612 | def close(): |
|
1612 | def close(): | |
1613 | """Close the handle on this repository.""" |
|
1613 | """Close the handle on this repository.""" | |
1614 |
|
1614 | |||
1615 | def peer(): |
|
1615 | def peer(path=None): | |
1616 | """Obtain an object conforming to the ``peer`` interface.""" |
|
1616 | """Obtain an object conforming to the ``peer`` interface.""" | |
1617 |
|
1617 | |||
1618 | def unfiltered(): |
|
1618 | def unfiltered(): |
@@ -303,8 +303,8 b' class localcommandexecutor:' | |||||
303 | class localpeer(repository.peer): |
|
303 | class localpeer(repository.peer): | |
304 | '''peer for a local repo; reflects only the most recent API''' |
|
304 | '''peer for a local repo; reflects only the most recent API''' | |
305 |
|
305 | |||
306 | def __init__(self, repo, caps=None): |
|
306 | def __init__(self, repo, caps=None, path=None): | |
307 | super(localpeer, self).__init__(repo.ui) |
|
307 | super(localpeer, self).__init__(repo.ui, path=path) | |
308 |
|
308 | |||
309 | if caps is None: |
|
309 | if caps is None: | |
310 | caps = moderncaps.copy() |
|
310 | caps = moderncaps.copy() | |
@@ -451,8 +451,8 b' class locallegacypeer(localpeer):' | |||||
451 | """peer extension which implements legacy methods too; used for tests with |
|
451 | """peer extension which implements legacy methods too; used for tests with | |
452 | restricted capabilities""" |
|
452 | restricted capabilities""" | |
453 |
|
453 | |||
454 | def __init__(self, repo): |
|
454 | def __init__(self, repo, path=None): | |
455 | super(locallegacypeer, self).__init__(repo, caps=legacycaps) |
|
455 | super(locallegacypeer, self).__init__(repo, caps=legacycaps, path=path) | |
456 |
|
456 | |||
457 | # Begin of baselegacywirecommands interface. |
|
457 | # Begin of baselegacywirecommands interface. | |
458 |
|
458 | |||
@@ -1633,8 +1633,8 b' class localrepository:' | |||||
1633 | parts.pop() |
|
1633 | parts.pop() | |
1634 | return False |
|
1634 | return False | |
1635 |
|
1635 | |||
1636 | def peer(self): |
|
1636 | def peer(self, path=None): | |
1637 | return localpeer(self) # not cached to avoid reference cycle |
|
1637 | return localpeer(self, path=path) # not cached to avoid reference cycle | |
1638 |
|
1638 | |||
1639 | def unfiltered(self): |
|
1639 | def unfiltered(self): | |
1640 | """Return unfiltered version of the repository |
|
1640 | """Return unfiltered version of the repository |
@@ -236,8 +236,8 b' class statichttprepository(' | |||||
236 | def local(self): |
|
236 | def local(self): | |
237 | return False |
|
237 | return False | |
238 |
|
238 | |||
239 | def peer(self): |
|
239 | def peer(self, path=None): | |
240 | return statichttppeer(self) |
|
240 | return statichttppeer(self, path=path) | |
241 |
|
241 | |||
242 | def wlock(self, wait=True): |
|
242 | def wlock(self, wait=True): | |
243 | raise error.LockUnavailable( |
|
243 | raise error.LockUnavailable( |
@@ -257,8 +257,8 b' class unionrepository:' | |||||
257 | def cancopy(self): |
|
257 | def cancopy(self): | |
258 | return False |
|
258 | return False | |
259 |
|
259 | |||
260 | def peer(self): |
|
260 | def peer(self, path=None): | |
261 | return unionpeer(self) |
|
261 | return unionpeer(self, path=None) | |
262 |
|
262 | |||
263 | def getcwd(self): |
|
263 | def getcwd(self): | |
264 | return encoding.getcwd() # always outside the repo |
|
264 | return encoding.getcwd() # always outside the repo |
@@ -15,10 +15,10 b' def wrapcapable(orig, self, name, *args,' | |||||
15 | if name in b'$CAP'.split(b' '): |
|
15 | if name in b'$CAP'.split(b' '): | |
16 | return False |
|
16 | return False | |
17 | return orig(self, name, *args, **kwargs) |
|
17 | return orig(self, name, *args, **kwargs) | |
18 | def wrappeer(orig, self): |
|
18 | def wrappeer(orig, self, path=None): | |
19 | # Since we're disabling some newer features, we need to make sure local |
|
19 | # Since we're disabling some newer features, we need to make sure local | |
20 | # repos add in the legacy features again. |
|
20 | # repos add in the legacy features again. | |
21 | return localrepo.locallegacypeer(self) |
|
21 | return localrepo.locallegacypeer(self, path=path) | |
22 | EOF |
|
22 | EOF | |
23 |
|
23 | |||
24 | echo '[extensions]' >> $HGRCPATH |
|
24 | echo '[extensions]' >> $HGRCPATH |
General Comments 0
You need to be logged in to leave comments.
Login now