changeset 825:c3450512237d

svnexternals.py: style cleanups Prefixed unused variables that have to stay because of tuple unpacking with _, removed some unused variables, fix some trailing whitespace.
author Yonggang Luo <luoyonggang@gmail.com>
date Sat, 01 Oct 2011 00:45:45 +0800
parents 38ebdf65d868
children 8794302f3614
files hgsubversion/svnexternals.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -17,7 +17,7 @@ try:
     canonpath = hgutil.canonpath
 except (ImportError, AttributeError):
     from mercurial import scmutil
-    canonpath = scmutil.canonpath    
+    canonpath = scmutil.canonpath
     passpegrev = False
 
 import util
@@ -59,7 +59,6 @@ class externalsfile(dict):
     def read(self, data):
         self.clear()
         fp = cStringIO.StringIO(data)
-        dirs = {}
         target = None
         for line in fp.readlines():
             if not line.strip():
@@ -232,7 +231,7 @@ class externalsupdater:
         if rev:
             revspec = ['-r', rev]
         if os.path.isdir(path):
-            exturl, extroot, extrev = getsvninfo(path)
+            exturl, _extroot, extrev = getsvninfo(path)
             # Comparing the source paths is not enough, but I don't
             # know how to compare path+pegrev. The following update
             # might fail if the path was replaced by another unrelated
@@ -347,7 +346,7 @@ def getchanges(ui, repo, parentctx, exts
         if exts:
             defs = parsedefinitions(ui, repo, '', exts)
             hgsub, hgsubstate = [], []
-            for path, rev, source, pegrev, norevline, base in sorted(defs):
+            for path, rev, _source, _pegrev, norevline, base in sorted(defs):
                 hgsub.append('%s = [hgsubversion] %s:%s\n'
                              % (path, base, norevline))
                 if rev is None: