/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Robert Collins
  • Date: 2010-05-06 23:41:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506234135-yivbzczw1sejxnxc
Lock methods on ``Tree``, ``Branch`` and ``Repository`` are now
expected to return an object which can be used to unlock them. This reduces
duplicate code when using cleanups. The previous 'tokens's returned by
``Branch.lock_write`` and ``Repository.lock_write`` are now attributes
on the result of the lock_write. ``repository.RepositoryWriteLockResult``
and ``branch.BranchWriteLockResult`` document this. (Robert Collins)

``log._get_info_for_log_files`` now takes an add_cleanup callable.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        self._socket.close()
284
284
 
285
285
    def run(self):
286
 
        trace.mutter('SocketListener %r has started', self)
287
286
        while True:
288
287
            readable, writable_unused, exception_unused = \
289
288
                select.select([self._socket], [], [], 0.1)
290
289
            if self._stop_event.isSet():
291
 
                trace.mutter('SocketListener %r has stopped', self)
292
290
                return
293
291
            if len(readable) == 0:
294
292
                continue
295
293
            try:
296
294
                s, addr_unused = self._socket.accept()
297
 
                trace.mutter('SocketListener %r has accepted connection %r',
298
 
                    self, s)
299
295
                # because the loopback socket is inline, and transports are
300
296
                # never explicitly closed, best to launch a new thread.
301
297
                threading.Thread(target=self._callback, args=(s,)).start()