Patchwork D6042: py3: convert filtername to str if it's None

login
register
mail settings
Submitter phabricator
Date March 3, 2019, 9:02 p.m.
Message ID <e8739945d05e3076e824e384eba08d15@localhost.localdomain>
Download mbox | patch
Permalink /patch/39022/
State Not Applicable
Headers show

Comments

phabricator - March 3, 2019, 9:02 p.m.
pulkit updated this revision to Diff 14320.
pulkit edited the summary of this revision.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6042?vs=14285&id=14320

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -359,8 +359,11 @@ 
         self.filteredhash = scmutil.filteredhash(repo, self.tiprev)
 
         duration = util.timer() - starttime
+        filtername = repo.filtername
+        if filtername is None:
+            filtername = 'None'
         repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n',
-                    repo.filtername, duration)
+                    repo.filtername or b'None', duration)
 
         self.write(repo)