mercurial/wireproto.py
changeset 13720 9c4e04fe267e
parent 13450 b3f9af7c22c5
child 13721 3458c15ab2f0
--- a/mercurial/wireproto.py	Tue Mar 22 07:37:56 2011 +0100
+++ b/mercurial/wireproto.py	Tue Mar 22 07:38:32 2011 +0100
@@ -133,6 +133,15 @@
             self.ui.status(_('remote: '), l)
         return ret
 
+    def debugwireargs(self, one, two, three=None, four=None):
+        # don't pass optional arguments left at their default value
+        opts = {}
+        if three is not None:
+            opts['three'] = three
+        if four is not None:
+            opts['four'] = four
+        return self._call('debugwireargs', one=one, two=two, **opts)
+
 # server side
 
 class streamres(object):
@@ -199,6 +208,9 @@
     cg = repo.changegroupsubset(bases, heads, 'serve')
     return streamres(proto.groupchunks(cg))
 
+def debugwireargs(repo, proto, one, two):
+    return repo.debugwireargs(one, two)
+
 def heads(repo, proto):
     h = repo.heads()
     return encodelist(h) + "\n"
@@ -343,6 +355,7 @@
     'capabilities': (capabilities, ''),
     'changegroup': (changegroup, 'roots'),
     'changegroupsubset': (changegroupsubset, 'bases heads'),
+    'debugwireargs': (debugwireargs, 'one two'),
     'heads': (heads, ''),
     'hello': (hello, ''),
     'listkeys': (listkeys, 'namespace'),