changeset 8631:a87c41f65aff

util: simplify range expression The n index variable was unused. Every iteration would pop one element off of parts, so the for loop can be replaced with a while loop.
author Martin Geisler <mg@lazybytes.net>
date Tue, 26 May 2009 22:37:26 +0200
parents 8ff65f7e3273
children 9e055cfdd620
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Tue May 26 22:09:39 2009 +0200
+++ b/mercurial/util.py	Tue May 26 22:37:26 2009 +0200
@@ -512,7 +512,7 @@
                                 (path, prefix))
         parts.pop()
         prefixes = []
-        for n in range(len(parts)):
+        while parts:
             prefix = os.sep.join(parts)
             if prefix in self.auditeddir:
                 break