Patchwork D7852: scmutil: fix an unbound variable with progressbar debug enabled

login
register
mail settings
Submitter phabricator
Date Jan. 13, 2020, 10:59 p.m.
Message ID <differential-rev-PHID-DREV-tthxhbmk2usl7x3o2sov-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44299/
State Superseded
Headers show

Comments

phabricator - Jan. 13, 2020, 10:59 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7852

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1760,6 +1760,7 @@ 
         self._updatebar(self.topic, self.pos, b"", self.unit, self.total)
 
     def _printdebug(self, item):
+        unit = b''
         if self.unit:
             unit = b' ' + self.unit
         if item: