~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-25 18:42:17 UTC
  • mfrom: (2039.1.2 progress-cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20060925184217-fd144de117df49c3
cleanup progress properly when interrupted during fetch (#54000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
        # revisions. We don't need to see all lines in the inventory because
427
427
        # only those added in an inventory in rev X can contain a revision=X
428
428
        # line.
429
 
        for line in w.iter_lines_added_or_present_in_versions(selected_revision_ids):
430
 
            start = line.find('file_id="')+9
431
 
            if start < 9: continue
432
 
            end = line.find('"', start)
433
 
            assert end>= 0
434
 
            file_id = _unescape_xml(line[start:end])
 
429
        pb = ui.ui_factory.nested_progress_bar()
 
430
        try:
 
431
            for line in w.iter_lines_added_or_present_in_versions(
 
432
                selected_revision_ids, pb=pb):
 
433
                start = line.find('file_id="')+9
 
434
                if start < 9: continue
 
435
                end = line.find('"', start)
 
436
                assert end>= 0
 
437
                file_id = _unescape_xml(line[start:end])
435
438
 
436
 
            start = line.find('revision="')+10
437
 
            if start < 10: continue
438
 
            end = line.find('"', start)
439
 
            assert end>= 0
440
 
            revision_id = _unescape_xml(line[start:end])
441
 
            if revision_id in selected_revision_ids:
442
 
                result.setdefault(file_id, set()).add(revision_id)
 
439
                start = line.find('revision="')+10
 
440
                if start < 10: continue
 
441
                end = line.find('"', start)
 
442
                assert end>= 0
 
443
                revision_id = _unescape_xml(line[start:end])
 
444
                if revision_id in selected_revision_ids:
 
445
                    result.setdefault(file_id, set()).add(revision_id)
 
446
        finally:
 
447
            pb.finished()
443
448
        return result
444
449
 
445
450
    @needs_read_lock