diff mercurial/httprepo.py @ 5259:65dc707606ed

Push capability checking into protocol-level code.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 27 Aug 2007 14:48:08 -0700
parents b534c502bfb3
children 24de027551c1
line wrap: on
line diff
--- a/mercurial/httprepo.py	Mon Aug 27 14:16:04 2007 -0700
+++ b/mercurial/httprepo.py	Mon Aug 27 14:48:08 2007 -0700
@@ -354,6 +354,7 @@
             fp.close()
 
     def lookup(self, key):
+        self.requirecap('lookup', _('look up remote revision'))
         d = self.do_cmd("lookup", key = key).read()
         success, data = d[:-1].split(' ', 1)
         if int(success):
@@ -391,6 +392,7 @@
         return util.chunkbuffer(zgenerator(f))
 
     def changegroupsubset(self, bases, heads, source):
+        self.requirecap('changegroupsubset', _('look up remote changes'))
         baselst = " ".join([hex(n) for n in bases])
         headlst = " ".join([hex(n) for n in heads])
         f = self.do_cmd("changegroupsubset", bases=baselst, heads=headlst)