Mercurial > hg
changeset 28904:80be5dbe6e74
cmdutil: avoid recycling variable name "name" in namespaces code
This just feels like asking for future trouble and confusion.
author | Nathaniel Manista <nathaniel@google.com> |
---|---|
date | Thu, 14 Apr 2016 15:26:18 -0400 |
parents | e1dd0de26557 |
children | c969c72d6cbc |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Apr 05 06:53:33 2016 +0200 +++ b/mercurial/cmdutil.py Thu Apr 14 15:26:18 2016 -0400 @@ -1275,10 +1275,10 @@ self.ui.write(_("branch: %s\n") % branch, label='log.branch') - for name, ns in self.repo.names.iteritems(): + for nsname, ns in self.repo.names.iteritems(): # branches has special logic already handled above, so here we just # skip it - if name == 'branches': + if nsname == 'branches': continue # we will use the templatename as the color name since those two # should be the same