Mercurial > python-hglib
diff hglib/client.py @ 8:3ac38d500d68
move hgclient._eatlines to util
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 10 Aug 2011 01:38:18 +0300 |
parents | 96f8c5095e2e |
children | fce3102c19e5 |
line wrap: on
line diff
--- a/hglib/client.py Sat Jul 23 22:55:39 2011 +0300 +++ b/hglib/client.py Wed Aug 10 01:38:18 2011 +0300 @@ -65,13 +65,6 @@ fields compose one revision. ''' return [self.revision._make(rev) for rev in util.grouper(6, splitted)] - def _eatlines(self, s, n): - idx = 0 - for i in xrange(n): - idx = s.find('\n', idx) + 1 - - return s[idx:] - def runcommand(self, args, inchannels, outchannels): def writeblock(data): self.server.stdin.write(struct.pack(self.inputfmt, len(data))) @@ -206,7 +199,7 @@ if not out: return [] - out = self._eatlines(out, 2).split('\0')[:-1] + out = util.eatlines(out, 2).split('\0')[:-1] return self._parserevs(out) def outgoing(self, revrange=None, path=None): @@ -221,7 +214,7 @@ if not out: return [] - out = self._eatlines(out, 2).split('\0')[:-1] + out = util.eatlines(out, 2).split('\0')[:-1] return self._parserevs(out) def commit(self, message, addremove=False):