call site 1 for path.local.visit
misc/testing/test_update_website.py - line 19
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
   def test_rsync():
       temp = py.test.ensuretemp('update_website_rsync')
       pkgpath = temp.join('pkg')
       apipath = temp.join('apigen')
       pkgpath.ensure('foo/bar.txt', file=True).write('baz')
       pkgpath.ensure('spam/eggs.txt', file=True).write('spam')
       apipath.ensure('api/foo.html', file=True).write('<html />')
       apipath.ensure('source/spam.html', file=True).write('<html />')
   
       rsyncpath = temp.join('rsync')
       assert not rsyncpath.check()
       gateway = py.execnet.PopenGateway()
->     update_website.rsync(pkgpath, apipath, gateway, rsyncpath.strpath)
       assert rsyncpath.check(dir=True)
       assert rsyncpath.join('pkg').check(dir=True)
       assert rsyncpath.join('pkg/spam/eggs.txt').read() == 'spam'
       assert rsyncpath.join('apigen').check(dir=True)
       assert rsyncpath.join('apigen/api/foo.html').read() == '<html />'
bin/_update_website.py - line 18
12
13
14
15
16
17
18
19
20
21
22
23
   def rsync(pkgpath, apidocspath, gateway, remotepath):
       """ copy the code and docs to the remote host """
       # copy to a temp dir first, even though both paths (normally) share the
       # same parent dir, that may contain other stuff that we don't want to
       # copy...
       tempdir = py.test.ensuretemp('update_website_rsync_temp')
->     pkgpath.copy(tempdir.ensure(pkgpath.basename, dir=True))
       apidocspath.copy(tempdir.ensure(apidocspath.basename, dir=True))
   
       rs = py.execnet.RSync(tempdir)
       rs.add_target(gateway, remotepath, delete=True)
       rs.send()
path/local/local.py - line 245
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
   def copy(self, target, archive=False):
       """ copy path to target."""
       assert not archive, "XXX archive-mode not supported"
       if self.check(file=1):
           if target.check(dir=1):
               target = target.join(self.basename)
           assert self!=target
           copychunked(self, target)
       else:
           target.ensure(dir=1)
           def rec(p):
               return p.check(link=0)
->         for x in self.visit(rec=rec):
               relpath = x.relto(self)
               newx = target.join(relpath)
               if x.check(link=1):
                   newx.mksymlinkto(x.readlink())
               elif x.check(file=1):
                   copychunked(x, newx)
               elif x.check(dir=1):
                   newx.ensure(dir=1)