hgext/progress.py
changeset 13148 ab5fcc473fd1
parent 13147 082f5be788d9
child 13154 e11c14f14491
equal deleted inserted replaced
13147:082f5be788d9 13148:ab5fcc473fd1
    26 The following settings are available::
    26 The following settings are available::
    27 
    27 
    28   [progress]
    28   [progress]
    29   delay = 3 # number of seconds (float) before showing the progress bar
    29   delay = 3 # number of seconds (float) before showing the progress bar
    30   refresh = 0.1 # time in seconds between refreshes of the progress bar
    30   refresh = 0.1 # time in seconds between refreshes of the progress bar
    31   format = topic bar number # format of the progress bar
    31   format = topic bar number estimate # format of the progress bar
    32   width = <none> # if set, the maximum width of the progress information
    32   width = <none> # if set, the maximum width of the progress information
    33                  # (that is, min(width, term width) will be used)
    33                  # (that is, min(width, term width) will be used)
    34   clear-complete = True # clear the progress bar after it's done
    34   clear-complete = True # clear the progress bar after it's done
    35   disable = False # if true, don't show a progress bar
    35   disable = False # if true, don't show a progress bar
    36   assume-tty = False # if true, ALWAYS show a progress bar, unless
    36   assume-tty = False # if true, ALWAYS show a progress bar, unless
    88         self.indetcount = 0
    88         self.indetcount = 0
    89         self.refresh = float(self.ui.config(
    89         self.refresh = float(self.ui.config(
    90             'progress', 'refresh', default=0.1))
    90             'progress', 'refresh', default=0.1))
    91         self.order = self.ui.configlist(
    91         self.order = self.ui.configlist(
    92             'progress', 'format',
    92             'progress', 'format',
    93             default=['topic', 'bar', 'number'])
    93             default=['topic', 'bar', 'number', 'estimate'])
    94 
    94 
    95     def show(self, now, topic, pos, item, unit, total):
    95     def show(self, now, topic, pos, item, unit, total):
    96         if not shouldprint(self.ui):
    96         if not shouldprint(self.ui):
    97             return
    97             return
    98         termwidth = self.width()
    98         termwidth = self.width()