~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

Changed to using existing methods for finding branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
258
247
def check_branch(branch, verbose):
259
248
    """Run consistency checks on a branch.
260
249
    
335
324
        _check_repository(repo, verbose)
336
325
        if branch is None:
337
326
            # We are in a shared repository
338
 
            for branch in _scan_for_branches(path):
 
327
            for branch in repo.find_branches(using=True):
339
328
                check_branch(branch, verbose)