# HG changeset patch # User zbynek@alex.kolej.mff.cuni.cz # Date 1127858509 25200 # Node ID 94586af53d2f45a8e294dbc6439d609518efc1d7 # Parent ec1895e297f770b8e71f44c0cd53ade944c04efa Replacing select.select() with os.fstat() which works also on windows. diff -r ec1895e297f7 -r 94586af53d2f mercurial/sshrepo.py --- a/mercurial/sshrepo.py Tue Sep 27 14:59:30 2005 -0700 +++ b/mercurial/sshrepo.py Tue Sep 27 15:01:49 2005 -0700 @@ -8,7 +8,7 @@ from node import * from remoterepo import * from demandload import * -demandload(globals(), "hg os re select") +demandload(globals(), "hg os re stat") class sshrepository(remoterepository): def __init__(self, ui, path): @@ -37,8 +37,8 @@ def readerr(self): while 1: - r,w,x = select.select([self.pipee], [], [], 0) - if not r: break + size = os.fstat(self.pipee.fileno())[stat.ST_SIZE] + if size == 0: break l = self.pipee.readline() if not l: break self.ui.status("remote: ", l) @@ -47,8 +47,7 @@ try: self.pipeo.close() self.pipei.close() - for l in self.pipee: - self.ui.status("remote: ", l) + readerr() self.pipee.close() except: pass