/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/check.py

Added _scan_for_branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
# raising them.  If there's more than one exception it'd be good to see them
33
33
# all.
34
34
 
35
 
from bzrlib import errors
 
35
from bzrlib import errors, osutils
36
36
from bzrlib import repository as _mod_repository
37
37
from bzrlib import revision
38
38
from bzrlib.branch import Branch
244
244
            seen_names[path] = True
245
245
 
246
246
 
 
247
def _scan_for_branches(path):
 
248
    dirs = osutils.walkdirs(path).next()[1]
 
249
    branches = []
 
250
    for dir in dirs:
 
251
        try:
 
252
            branches.append(Branch.open_containing(dir[0])[0])
 
253
        except errors.NotBranchError:
 
254
            pass
 
255
    return branches
 
256
 
 
257
 
247
258
def check_branch(branch, verbose):
248
259
    """Run consistency checks on a branch.
249
260