# HG changeset patch # User Nathaniel Manista # Date 2016-04-14 19:26:18 # Node ID 80be5dbe6e74a1b2f20ee118791a6e046a78cccf # Parent e1dd0de26557d9f36dbd82943a5f5ffd0167a833 cmdutil: avoid recycling variable name "name" in namespaces code This just feels like asking for future trouble and confusion. diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1275,10 +1275,10 @@ class changeset_printer(object): 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