This revision was automatically updated to reflect the committed changes. Closed by commit rHG3025fd3c2e71: progress: split up _print() method in bar-updating and debug-printing (authored by martinvonz, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5529?vs=13079&id=13099 REVISION DETAIL https://phab.mercurial-scm.org/D5529 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1434,18 +1434,20 @@ if total: self.total = total self.pos = pos - self._print(item) + self._updatebar(item) + if self.debug: + self._printdebug(item) def increment(self, step=1, item="", total=None): self.update(self.pos + step, item, total) def complete(self): self.pos = None self.unit = "" self.total = None - self._print("") + self._updatebar("") - def _print(self, item): + def _updatebar(self, item): if getattr(self.ui._fmsgerr, 'structured', False): # channel for machine-readable output with metadata, just send # raw information @@ -1459,9 +1461,7 @@ self.ui._progbar.progress(self.topic, self.pos, item=item, unit=self.unit, total=self.total) - if self.pos is None or not self.debug: - return - + def _printdebug(self, item): if self.unit: unit = ' ' + self.unit if item: To: martinvonz, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel