comparison mercurial/sshrepo.py @ 5255: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 32ec518ee3cb
comparison
equal deleted inserted replaced
5254:b534c502bfb3 5255:65dc707606ed
129 129
130 def unlock(self): 130 def unlock(self):
131 self.call("unlock") 131 self.call("unlock")
132 132
133 def lookup(self, key): 133 def lookup(self, key):
134 self.requirecap('lookup', _('look up remote revision'))
134 d = self.call("lookup", key=key) 135 d = self.call("lookup", key=key)
135 success, data = d[:-1].split(" ", 1) 136 success, data = d[:-1].split(" ", 1)
136 if int(success): 137 if int(success):
137 return bin(data) 138 return bin(data)
138 else: 139 else:
166 def changegroup(self, nodes, kind): 167 def changegroup(self, nodes, kind):
167 n = " ".join(map(hex, nodes)) 168 n = " ".join(map(hex, nodes))
168 return self.do_cmd("changegroup", roots=n) 169 return self.do_cmd("changegroup", roots=n)
169 170
170 def changegroupsubset(self, bases, heads, kind): 171 def changegroupsubset(self, bases, heads, kind):
172 self.requirecap('changegroupsubset', _('look up remote changes'))
171 bases = " ".join(map(hex, bases)) 173 bases = " ".join(map(hex, bases))
172 heads = " ".join(map(hex, heads)) 174 heads = " ".join(map(hex, heads))
173 return self.do_cmd("changegroupsubset", bases=bases, heads=heads) 175 return self.do_cmd("changegroupsubset", bases=bases, heads=heads)
174 176
175 def unbundle(self, cg, heads, source): 177 def unbundle(self, cg, heads, source):