Mercurial > public > mercurial-scm > hg
comparison mercurial/sshrepo.py @ 10282:08a0f04b56bd
many, many trivial check-code fixups
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 25 Jan 2010 00:05:27 -0600 |
parents | 25e572394f5c |
children | 9936ed1d04f4 |
comparison
equal
deleted
inserted
replaced
10281:e7d3b509af8b | 10282:08a0f04b56bd |
---|---|
88 break | 88 break |
89 | 89 |
90 def readerr(self): | 90 def readerr(self): |
91 while 1: | 91 while 1: |
92 size = util.fstat(self.pipee).st_size | 92 size = util.fstat(self.pipee).st_size |
93 if size == 0: break | 93 if size == 0: |
94 break | |
94 l = self.pipee.readline() | 95 l = self.pipee.readline() |
95 if not l: break | 96 if not l: |
97 break | |
96 self.ui.status(_("remote: "), l) | 98 self.ui.status(_("remote: "), l) |
97 | 99 |
98 def abort(self, exception): | 100 def abort(self, exception): |
99 self.cleanup() | 101 self.cleanup() |
100 raise exception | 102 raise exception |
188 | 190 |
189 def branches(self, nodes): | 191 def branches(self, nodes): |
190 n = " ".join(map(hex, nodes)) | 192 n = " ".join(map(hex, nodes)) |
191 d = self.call("branches", nodes=n) | 193 d = self.call("branches", nodes=n) |
192 try: | 194 try: |
193 br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] | 195 br = [tuple(map(bin, b.split(" "))) for b in d.splitlines()] |
194 return br | 196 return br |
195 except: | 197 except: |
196 self.abort(error.ResponseError(_("unexpected response:"), d)) | 198 self.abort(error.ResponseError(_("unexpected response:"), d)) |
197 | 199 |
198 def between(self, pairs): | 200 def between(self, pairs): |
199 n = " ".join(["-".join(map(hex, p)) for p in pairs]) | 201 n = " ".join(["-".join(map(hex, p)) for p in pairs]) |
200 d = self.call("between", pairs=n) | 202 d = self.call("between", pairs=n) |
201 try: | 203 try: |
202 p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] | 204 p = [l and map(bin, l.split(" ")) or [] for l in d.splitlines()] |
203 return p | 205 return p |
204 except: | 206 except: |
205 self.abort(error.ResponseError(_("unexpected response:"), d)) | 207 self.abort(error.ResponseError(_("unexpected response:"), d)) |
206 | 208 |
207 def changegroup(self, nodes, kind): | 209 def changegroup(self, nodes, kind): |