~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2008-02-24 16:42:13 UTC
  • mfrom: (3234 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: aaron@aaronbentley.com-20080224164213-eza1lzru5bwuwmmj
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
        """
360
360
        return WorkingTree.open(path, _unsupported=True)
361
361
 
 
362
    @staticmethod
 
363
    def find_trees(location):
 
364
        def list_current(transport):
 
365
            return [d for d in transport.list_dir('') if d != '.bzr']
 
366
        def evaluate(bzrdir):
 
367
            try:
 
368
                tree = bzrdir.open_workingtree()
 
369
            except errors.NoWorkingTree:
 
370
                return True, None
 
371
            else:
 
372
                return True, tree
 
373
        transport = get_transport(location)
 
374
        iterator = bzrdir.BzrDir.find_bzrdirs(transport, evaluate=evaluate,
 
375
                                              list_current=list_current)
 
376
        return [t for t in iterator if t is not None]
 
377
 
362
378
    # should be deprecated - this is slow and in any case treating them as a
363
379
    # container is (we now know) bad style -- mbp 20070302
364
380
    ## @deprecated_method(zero_fifteen)