call site 0 for execnet.RSync.filter
execnet/testing/test_rsync.py - line 82
75
76
77
78
79
80
81
82
83
84
85
   def test_rsync_default_reporting(self):
       source = self.source
       source.ensure("hello")
       cap = py.io.StdCapture()
       try:
           rsync = RSync(source)
           rsync.add_target(gw, self.dest1)
->         rsync.send()
       finally:
           out, err = cap.reset()
       assert out.find("hello") != -1
execnet/rsync.py - line 102
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
   def send(self, raises=True):
       """ Sends a sourcedir to all added targets. Flag indicates
           whether to raise an error or return in case of lack of
           targets
           """
       if not self._channels:
           if raises:
               raise IOError("no targets available, maybe you "
                             "are trying call send() twice?")
           return
       # normalize a trailing '/' away
       self._sourcedir = os.path.dirname(os.path.join(self._sourcedir, 'x'))
       # send directory structure and file timestamps/sizes
->     self._send_directory_structure(self._sourcedir)
   
       # paths and to_send are only used for doing
       # progress-related callbacks
       self._paths = {}
       self._to_send = {}
   
       # send modified file to clients
       while self._channels:
           channel, req = self._receivequeue.get()
           if req is None:
               self._end_of_channel(channel)
           else:
               command, data = req
               if command == "links":
                   self._process_link(channel)
               elif command == "done":
                   self._done(channel)
               elif command == "ack":
                   if self._callback:
                       self._callback("ack", self._paths[data], channel)
               elif command == "list_done":
                   self._list_done(channel)
               elif command == "send":
                   self._send_item(channel, data)
                   del data
               else:
                   assert "Unknown command %s" % command
execnet/rsync.py - line 189
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
   def _send_directory_structure(self, path):
       try:
           st = os.lstat(path)
       except OSError:
           self._broadcast((0, 0))
           return
       if stat.S_ISREG(st.st_mode):
           # regular file: send a timestamp/size pair
           self._broadcast((st.st_mtime, st.st_size))
       elif stat.S_ISDIR(st.st_mode):
->         self._send_directory(path)
       elif stat.S_ISLNK(st.st_mode):
           self._send_link_structure(path)
       else:
           raise ValueError, "cannot sync %r" % (path,)
execnet/rsync.py - line 159
153
154
155
156
157
158
159
160
161
162
163
164
   def _send_directory(self, path):
       # dir: send a list of entries
       names = []
       subpaths = []
       for name in os.listdir(path):
           p = os.path.join(path, name)
->         if self.filter(p):
               names.append(name)
               subpaths.append(p)
       self._broadcast(names)
       for p in subpaths:
           self._send_directory_structure(p)