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

  • Committer: Jelmer Vernooij
  • Date: 2018-03-31 19:47:40 UTC
  • mto: (0.200.1910 work)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180331194740-q1lhux2ao2etsblk
Use same logic for interpreting progress reports everywhere.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    imap,
35
35
    )
36
36
import posixpath
37
 
import re
38
37
import stat
39
38
 
40
39
from ... import (
532
531
    return pack_hints, last_imported
533
532
 
534
533
 
535
 
_GIT_PROGRESS_RE = re.compile(r"(.*?): +(\d+)% \((\d+)/(\d+)\)")
536
 
def report_git_progress(pb, text):
537
 
    text = text.rstrip("\r\n")
538
 
    trace.mutter('git: %s', text)
539
 
    g = _GIT_PROGRESS_RE.match(text)
540
 
    if g is not None:
541
 
        (text, pct, current, total) = g.groups()
542
 
        pb.update(text, int(current), int(total))
543
 
    else:
544
 
        pb.update(text, 0, 0)
545
 
 
546
 
 
547
534
class DetermineWantsRecorder(object):
548
535
 
549
536
    def __init__(self, actual):