[svn r38378] snapshot commit for: each rsync root is now copied to
remote-topdir.join(root.basename) --HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									663447a7d1
								
							
						
					
					
						commit
						e11e7472bc
					
				|  | @ -139,7 +139,10 @@ class HostManager(object): | |||
|         for root in self.roots: | ||||
|             rsync = HostRSync(root, ignores=ignores,  | ||||
|                               verbose=self.config.option.verbose) | ||||
|             destrelpath = root.relto(self.config.topdir) | ||||
|             if root == self.config.topdir: | ||||
|                 destrelpath ="" | ||||
|             else: | ||||
|                 destrelpath = root.basename | ||||
|             for host in self.hosts: | ||||
|                 rsync.add_target_host(host, destrelpath, reporter) | ||||
|             rsync.send(raises=False) | ||||
|  |  | |||
|  | @ -170,6 +170,7 @@ class TestHostManager(DirSetup): | |||
|         dir2 = self.source.ensure("dir1", "dir2", dir=1) | ||||
|         dir2.ensure("hello") | ||||
|         config = py.test.config._reparse([self.source]) | ||||
|         assert config.topdir == self.source | ||||
|         hm = HostManager(config,  | ||||
|                 hosts=[HostInfo("localhost:" + str(self.dest))]) | ||||
|         events = [] | ||||
|  | @ -191,11 +192,9 @@ class TestHostManager(DirSetup): | |||
|                          hosts=[HostInfo("localhost:" + str(self.dest))]) | ||||
|         events = [] | ||||
|         hm.init_rsync(reporter=events.append) | ||||
|         assert self.dest.join("dir1").check() | ||||
|         assert self.dest.join("dir1", "dir2").check() | ||||
|         assert self.dest.join("dir1", "dir2", 'hello').check() | ||||
|         assert self.dest.join("dir2").check() | ||||
|         assert not self.dest.join("dir1").check() | ||||
|         assert not self.dest.join("bogus").check() | ||||
|         assert not self.dest.join("dir1", "somefile").check() | ||||
| 
 | ||||
|     def test_hostmanager_rsync_ignore(self): | ||||
|         dir2 = self.source.ensure("dir1", "dir2", dir=1) | ||||
|  | @ -209,6 +208,7 @@ class TestHostManager(DirSetup): | |||
|         hm = HostManager(config,  | ||||
|                          hosts=[HostInfo("localhost:" + str(self.dest))]) | ||||
|         events = [] | ||||
|         print events | ||||
|         hm.init_rsync(reporter=events.append) | ||||
|         assert self.dest.join("dir1").check() | ||||
|         assert not self.dest.join("dir1", "dir2").check() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue