Submitter | phabricator |
---|---|
Date | March 2, 2019, 12:13 a.m. |
Message ID | <differential-rev-PHID-DREV-ebdze65ahf5wsexnky5j-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/38987/ |
State | Superseded |
Headers | show |
Comments
> + filtername = repo.filtername > + if filtername is None: > + filtername = 'None' > repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n', > - repo.filtername, duration) > + filtername, duration) Perhaps, we can use %r instead. It's just logging, we wouldn't care the output format. Or simply, `repo.filtername or b'None'`.
yuja added a comment. > + filtername = repo.filtername > + if filtername is None: > + filtername = 'None' > > repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n', > > - repo.filtername, duration) + filtername, duration) Perhaps, we can use %r instead. It's just logging, we wouldn't care the output format. Or simply, `repo.filtername or b'None'`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6042 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) + filtername, duration) self.write(repo)