Show More
@@ -1428,16 +1428,14 b' class progress(object):' | |||||
1428 | # TODO: consider porting some useful information (e.g. estimated |
|
1428 | # TODO: consider porting some useful information (e.g. estimated | |
1429 | # time) from progbar. we might want to support update delay to |
|
1429 | # time) from progbar. we might want to support update delay to | |
1430 | # reduce the cost of transferring progress messages. |
|
1430 | # reduce the cost of transferring progress messages. | |
1431 | def updatebar(item): |
|
1431 | def updatebar(topic, pos, item, unit, total): | |
1432 |
ui._fmsgerr.write(None, type=b'progress', topic= |
|
1432 | ui._fmsgerr.write(None, type=b'progress', topic=topic, | |
1433 |
pos= |
|
1433 | pos=pos, item=item, unit=unit, | |
1434 |
total= |
|
1434 | total=total) | |
1435 | elif ui._progbar is not None: |
|
1435 | elif ui._progbar is not None: | |
1436 |
|
|
1436 | updatebar = ui._progbar.progress | |
1437 | ui._progbar.progress(self.topic, self.pos, item=item, |
|
|||
1438 | unit=self.unit, total=self.total) |
|
|||
1439 | else: |
|
1437 | else: | |
1440 | def updatebar(item): |
|
1438 | def updatebar(topic, pos, item, unit, total): | |
1441 | pass |
|
1439 | pass | |
1442 | self._updatebar = updatebar |
|
1440 | self._updatebar = updatebar | |
1443 |
|
1441 | |||
@@ -1452,7 +1450,7 b' class progress(object):' | |||||
1452 | if total: |
|
1450 | if total: | |
1453 | self.total = total |
|
1451 | self.total = total | |
1454 | self.pos = pos |
|
1452 | self.pos = pos | |
1455 | self._updatebar(item) |
|
1453 | self._updatebar(self.topic, self.pos, item, self.unit, self.total) | |
1456 | if self.debug: |
|
1454 | if self.debug: | |
1457 | self._printdebug(item) |
|
1455 | self._printdebug(item) | |
1458 |
|
1456 | |||
@@ -1463,7 +1461,7 b' class progress(object):' | |||||
1463 | self.pos = None |
|
1461 | self.pos = None | |
1464 | self.unit = "" |
|
1462 | self.unit = "" | |
1465 | self.total = None |
|
1463 | self.total = None | |
1466 | self._updatebar("") |
|
1464 | self._updatebar(self.topic, self.pos, "", self.unit, self.total) | |
1467 |
|
1465 | |||
1468 | def _printdebug(self, item): |
|
1466 | def _printdebug(self, item): | |
1469 | if self.unit: |
|
1467 | if self.unit: |
General Comments 0
You need to be logged in to leave comments.
Login now