changeset 3124:6ef274e01f64 stable

flake8: rename some ambiguous identifier Apparently, pyflakes declared war on 'l'.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 23 Oct 2017 15:25:00 +0200
parents 237b39bf7e6b
children ec0bbf26ce7f
files hgext3rd/evolve/__init__.py hgext3rd/evolve/legacy.py hgext3rd/topic/__init__.py
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Mon Oct 23 15:11:48 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Mon Oct 23 15:25:00 2017 +0200
@@ -1122,10 +1122,10 @@
         if othertroubles:
             hint = hintmap['+'.join(othertroubles)]
         else:
-            l = len(troubled[targetcat])
-            if l:
+            length = len(troubled[targetcat])
+            if length:
                 hint = _("%d other %s in the repository, do you want --any "
-                         "or --rev") % (l, targetcat)
+                         "or --rev") % (length, targetcat)
             else:
                 othertroubles = []
                 for cat in unselectedcategories:
--- a/hgext3rd/evolve/legacy.py	Mon Oct 23 15:11:48 2017 +0200
+++ b/hgext3rd/evolve/legacy.py	Mon Oct 23 15:25:00 2017 +0200
@@ -86,7 +86,7 @@
     """import markers from an .hg/obsolete-relations file"""
     cnt = 0
     err = 0
-    l = repo.lock()
+    lock = repo.lock()
     some = False
     try:
         unlink = []
@@ -163,7 +163,7 @@
             tr.release()
     finally:
         del repo._importoldobsolete
-        l.release()
+        lock.release()
     if not some:
         ui.warn(_('nothing to do\n'))
     ui.status('%i obsolete marker converted\n' % cnt)
--- a/hgext3rd/topic/__init__.py	Mon Oct 23 15:11:48 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Mon Oct 23 15:25:00 2017 +0200
@@ -517,16 +517,16 @@
             raise error.Abort('changing topic requires a topic name or --clear')
         if repo.revs('%ld and public()', touchedrevs):
             raise error.Abort("can't change topic of a public change")
-        wl = l = txn = None
+        wl = lock = txn = None
         try:
             wl = repo.wlock()
-            l = repo.lock()
+            lock = repo.lock()
             txn = repo.transaction('rewrite-topics')
             rewrote = _changetopics(ui, repo, touchedrevs, topic)
             txn.close()
             ui.status('changed topic on %d changes\n' % rewrote)
         finally:
-            lockmod.release(txn, l, wl)
+            lockmod.release(txn, lock, wl)
             repo.invalidate()
         return