diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -382,6 +382,7 @@ class httppeer(wireprotov1peer.wirepeer) self._path = path self._url = url self._caps = caps + self.limitedarguments = caps is not None and 'httppostargs' not in caps self._urlopener = opener self._requestbuilder = requestbuilder @@ -750,6 +751,9 @@ class httpv2executor(object): @interfaceutil.implementer(repository.ipeerv2) class httpv2peer(object): + + limitedarguments = False + def __init__(self, ui, repourl, apipath, opener, requestbuilder, apidescriptor): self.ui = ui diff --git a/mercurial/repository.py b/mercurial/repository.py --- a/mercurial/repository.py +++ b/mercurial/repository.py @@ -291,6 +291,10 @@ class ipeercommandexecutor(interfaceutil class ipeerrequests(interfaceutil.Interface): """Interface for executing commands on a peer.""" + limitedarguments = interfaceutil.Attribute( + """True if the peer cannot receive large argument value for commands.""" + ) + def commandexecutor(): """A context manager that resolves to an ipeercommandexecutor. @@ -329,6 +333,8 @@ class ipeerv2(ipeerconnection, ipeercapa class peer(object): """Base class for peer repositories.""" + limitedarguments = False + def capable(self, name): caps = self.capabilities() if name in caps: