[py-svn] r38023 - py/trunk/py/test/rsession
fijal at codespeak.net
fijal at codespeak.net
Tue Feb 6 20:01:13 CET 2007
Author: fijal
Date: Tue Feb 6 20:01:07 2007
New Revision: 38023
Modified:
py/trunk/py/test/rsession/hostmanage.py
Log:
Report HostRSyncing only in case where rsyncing is really performed.
Modified: py/trunk/py/test/rsession/hostmanage.py
==============================================================================
--- py/trunk/py/test/rsession/hostmanage.py (original)
+++ py/trunk/py/test/rsession/hostmanage.py Tue Feb 6 20:01:07 2007
@@ -91,12 +91,14 @@
else:
return True
- def add_target_host(self, host, destrelpath=None, finishedcallback=None):
+ def add_target_host(self, host, reporter=lambda x: None,
+ destrelpath=None, finishedcallback=None):
key = host.hostname, host.relpath
if key in self._synced:
if finishedcallback:
finishedcallback()
- return False
+ return False
+ reporter(repevent.HostRSyncing(host))
self._synced[key] = True
# the follow attributes are set from host.initgateway()
gw = host.gw
@@ -135,10 +137,9 @@
rsync = HostRSync(ignores=ignores)
destrelpath = root.relto(self.config.topdir)
for host in self.hosts:
- reporter(repevent.HostRSyncing(host))
def donecallback():
reporter(repevent.HostRSyncRootReady(host, root))
- rsync.add_target_host(host, destrelpath,
+ rsync.add_target_host(host, reporter, destrelpath,
finishedcallback=donecallback)
rsync.send(root)
More information about the pytest-commit
mailing list