##// END OF EJS Templates
fixed some stuff pychecker shows, marked unclear/wrong stuff with XXX
twaldmann@thinkmo.de -
r1541:bf4e7ef0 default
parent child Browse files
Show More
@@ -644,7 +644,7 b' def cat(ui, repo, file1, *pats, **opts):'
644 644 n = mf[abs]
645 645 except (hg.RepoError, KeyError):
646 646 try:
647 n = r.lookup(rev)
647 n = r.lookup(rev) # XXX rev undefined!
648 648 except KeyError, inst:
649 649 raise util.Abort(_('cannot find file %s in rev %s'), rel, rev)
650 650 else:
@@ -1016,7 +1016,7 b' def debugrename(ui, repo, file, rev=None'
1016 1016 change = repo.changelog.read(n)
1017 1017 m = repo.manifest.read(change[0])
1018 1018 n = m[relpath(repo, [file])[0]]
1019 except hg.RepoError, KeyError:
1019 except (hg.RepoError, KeyError):
1020 1020 n = r.lookup(rev)
1021 1021 else:
1022 1022 n = r.tip()
@@ -2470,7 +2470,7 b' def dispatch(args):'
2470 2470
2471 2471 external = []
2472 2472 for x in u.extensions():
2473 def on_exception(Exception, inst):
2473 def on_exception(Exception, inst): # XXX Exception is a builtin name!?
2474 2474 u.warn(_("*** failed to import extension %s\n") % x[1])
2475 2475 u.warn("%s\n" % inst)
2476 2476 if "--traceback" in sys.argv[1:]:
@@ -213,7 +213,7 b' class dirstate:'
213 213 unknown = []
214 214
215 215 for x in files:
216 if x is '.':
216 if x == '.':
217 217 return self.map.copy()
218 218 if x not in self.map:
219 219 unknown.append(x)
@@ -296,7 +296,6 b' class dirstate:'
296 296 def walkhelper(self, files, statmatch, dc):
297 297 # recursion free walker, faster than os.walk.
298 298 def findfiles(s):
299 retfiles = []
300 299 work = [s]
301 300 while work:
302 301 top = work.pop()
@@ -1,10 +1,10 b''
1 1 import getopt
2 2
3 3 def fancyopts(args, options, state):
4 long=[]
5 short=''
6 map={}
7 dt={}
4 long = []
5 short = ''
6 map = {}
7 dt = {}
8 8
9 9 for s, l, d, c in options:
10 10 pl = l.replace('-', '_')
@@ -58,7 +58,7 b' class filelog(revlog):'
58 58 return self.addrevision(text, transaction, link, p1, p2)
59 59
60 60 def renamed(self, node):
61 if 0 and self.parents(node)[0] != nullid:
61 if 0 and self.parents(node)[0] != nullid: # XXX
62 62 return False
63 63 m = self.readmeta(node)
64 64 if m and m.has_key("copy"):
@@ -954,7 +954,7 b' def create_server(repo):'
954 954 def server(path, name, templates, address, port, use_ipv6=False,
955 955 accesslog=sys.stdout, errorlog=sys.stderr):
956 956 httpd = create_server(path, name, templates, address, port, use_ipv6,
957 accesslog, errorlog)
957 accesslog, errorlog) # XXX wrong param count
958 958 httpd.serve_forever()
959 959
960 960 # This is a stopgap
@@ -5,7 +5,7 b''
5 5 # This software may be used and distributed according to the terms
6 6 # of the GNU General Public License, incorporated herein by reference.
7 7
8 import sys, struct
8 import struct
9 9 from revlog import *
10 10 from i18n import gettext as _
11 11 from demandload import *
@@ -7,7 +7,7 b' This software may be used and distribute'
7 7 of the GNU General Public License, incorporated herein by reference.
8 8 """
9 9
10 import sha, binascii
10 import binascii
11 11
12 12 nullid = "\0" * 20
13 13
@@ -12,7 +12,6 b''
12 12 # of the GNU General Public License, incorporated herein by reference.
13 13
14 14 import os
15 import util
16 15 from i18n import gettext as _
17 16
18 17 class transaction:
@@ -158,9 +158,11 b' def pathto(n1, n2):'
158 158 this returns a path in the form used by the local filesystem, not hg.'''
159 159 if not n1: return localpath(n2)
160 160 a, b = n1.split('/'), n2.split('/')
161 a.reverse(), b.reverse()
161 a.reverse()
162 b.reverse()
162 163 while a and b and a[-1] == b[-1]:
163 a.pop(), b.pop()
164 a.pop()
165 b.pop()
164 166 b.reverse()
165 167 return os.sep.join((['..'] * len(a)) + b)
166 168
@@ -253,7 +255,7 b' def _matcher(canonroot, cwd, names, inc,'
253 255 try:
254 256 pat = '(?:%s)' % regex(k, p, tail)
255 257 matches.append(re.compile(pat).match)
256 except re.error, inst:
258 except re.error:
257 259 raise Abort("invalid pattern: %s:%s" % (k, p))
258 260
259 261 def buildfn(text):
General Comments 0
You need to be logged in to leave comments. Login now