Show More
@@ -108,7 +108,14 b' class _multifile:' | |||||
108 |
|
108 | |||
109 |
|
109 | |||
110 | def makev1commandrequest( |
|
110 | def makev1commandrequest( | |
111 | ui, requestbuilder, caps, capablefn, repobaseurl, cmd, args |
|
111 | ui, | |
|
112 | requestbuilder, | |||
|
113 | caps, | |||
|
114 | capablefn, | |||
|
115 | repobaseurl, | |||
|
116 | cmd, | |||
|
117 | args, | |||
|
118 | remotehidden=False, | |||
112 | ): |
|
119 | ): | |
113 | """Make an HTTP request to run a command for a version 1 client. |
|
120 | """Make an HTTP request to run a command for a version 1 client. | |
114 |
|
121 | |||
@@ -127,6 +134,8 b' def makev1commandrequest(' | |||||
127 |
|
134 | |||
128 | ui.debug(b"sending %s command\n" % cmd) |
|
135 | ui.debug(b"sending %s command\n" % cmd) | |
129 | q = [(b'cmd', cmd)] |
|
136 | q = [(b'cmd', cmd)] | |
|
137 | if remotehidden: | |||
|
138 | q.append(('access-hidden', '1')) | |||
130 | headersize = 0 |
|
139 | headersize = 0 | |
131 | # Important: don't use self.capable() here or else you end up |
|
140 | # Important: don't use self.capable() here or else you end up | |
132 | # with infinite recursion when trying to look up capabilities |
|
141 | # with infinite recursion when trying to look up capabilities | |
@@ -385,18 +394,12 b' class httppeer(wireprotov1peer.wirepeer)' | |||||
385 | self, ui, path, url, opener, requestbuilder, caps, remotehidden=False |
|
394 | self, ui, path, url, opener, requestbuilder, caps, remotehidden=False | |
386 | ): |
|
395 | ): | |
387 | super().__init__(ui, path=path, remotehidden=remotehidden) |
|
396 | super().__init__(ui, path=path, remotehidden=remotehidden) | |
388 | if remotehidden: |
|
|||
389 | msg = _( |
|
|||
390 | b"ignoring `--remote-hidden` request\n" |
|
|||
391 | b"(access to hidden changeset for http peers not " |
|
|||
392 | b"supported yet)\n" |
|
|||
393 | ) |
|
|||
394 | ui.warn(msg) |
|
|||
395 | self._url = url |
|
397 | self._url = url | |
396 | self._caps = caps |
|
398 | self._caps = caps | |
397 | self.limitedarguments = caps is not None and b'httppostargs' not in caps |
|
399 | self.limitedarguments = caps is not None and b'httppostargs' not in caps | |
398 | self._urlopener = opener |
|
400 | self._urlopener = opener | |
399 | self._requestbuilder = requestbuilder |
|
401 | self._requestbuilder = requestbuilder | |
|
402 | self._remotehidden = remotehidden | |||
400 |
|
403 | |||
401 | def __del__(self): |
|
404 | def __del__(self): | |
402 | for h in self._urlopener.handlers: |
|
405 | for h in self._urlopener.handlers: | |
@@ -451,6 +454,7 b' class httppeer(wireprotov1peer.wirepeer)' | |||||
451 | self._url, |
|
454 | self._url, | |
452 | cmd, |
|
455 | cmd, | |
453 | args, |
|
456 | args, | |
|
457 | self._remotehidden, | |||
454 | ) |
|
458 | ) | |
455 |
|
459 | |||
456 | resp = sendrequest(self.ui, self._urlopener, req) |
|
460 | resp = sendrequest(self.ui, self._urlopener, req) |
General Comments 0
You need to be logged in to leave comments.
Login now