Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 22201:269688a398c4
cleanup: fix some list comprehension redefinitions of existing vars
In all the remaining cases the comprehension variable is used for the same
thing as a previous loop variable.
This will mute some pyflakes "list comprehension redefines" warnings.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 15 Aug 2014 04:37:46 +0200 |
parents | 37f46575d9c2 |
children | 650b5b6e75ed |
comparison
equal
deleted
inserted
replaced
22200:b27c3beaaf30 | 22201:269688a398c4 |
---|---|
674 def tagslist(self): | 674 def tagslist(self): |
675 '''return a list of tags ordered by revision''' | 675 '''return a list of tags ordered by revision''' |
676 if not self._tagscache.tagslist: | 676 if not self._tagscache.tagslist: |
677 l = [] | 677 l = [] |
678 for t, n in self.tags().iteritems(): | 678 for t, n in self.tags().iteritems(): |
679 r = self.changelog.rev(n) | 679 l.append((self.changelog.rev(n), t, n)) |
680 l.append((r, t, n)) | |
681 self._tagscache.tagslist = [(t, n) for r, t, n in sorted(l)] | 680 self._tagscache.tagslist = [(t, n) for r, t, n in sorted(l)] |
682 | 681 |
683 return self._tagscache.tagslist | 682 return self._tagscache.tagslist |
684 | 683 |
685 def nodetags(self, node): | 684 def nodetags(self, node): |