##// END OF EJS Templates
cleanup: remove superfluous space after space after equals (python)
timeless -
r27637:b502138f default
parent child Browse files
Show More
@@ -33,7 +33,7 b' def checkconsistency(ui, orig, dmap, _no'
33 def _checkdirstate(orig, self, arg):
33 def _checkdirstate(orig, self, arg):
34 """Check nonnormal set consistency before and after the call to orig"""
34 """Check nonnormal set consistency before and after the call to orig"""
35 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "before")
35 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "before")
36 r = orig(self, arg)
36 r = orig(self, arg)
37 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "after")
37 checkconsistency(self._ui, orig, self._map, self._nonnormalset, "after")
38 return r
38 return r
39
39
@@ -25,7 +25,7 b' def pygmentize(field, fctx, style, tmpl,'
25 # append a <link ...> to the syntax highlighting css
25 # append a <link ...> to the syntax highlighting css
26 old_header = tmpl.load('header')
26 old_header = tmpl.load('header')
27 if SYNTAX_CSS not in old_header:
27 if SYNTAX_CSS not in old_header:
28 new_header = old_header + SYNTAX_CSS
28 new_header = old_header + SYNTAX_CSS
29 tmpl.cache['header'] = new_header
29 tmpl.cache['header'] = new_header
30
30
31 text = fctx.data()
31 text = fctx.data()
@@ -150,7 +150,7 b" globals()['_GLOBAL_DONE'] = 0"
150 _TYPE_TXT = 16
150 _TYPE_TXT = 16
151 _TYPE_AAAA = 28
151 _TYPE_AAAA = 28
152 _TYPE_SRV = 33
152 _TYPE_SRV = 33
153 _TYPE_ANY = 255
153 _TYPE_ANY = 255
154
154
155 # Mapping constants to names
155 # Mapping constants to names
156
156
@@ -522,7 +522,7 b' class DNSIncoming(object):'
522 def readString(self, len):
522 def readString(self, len):
523 """Reads a string of a given length from the packet"""
523 """Reads a string of a given length from the packet"""
524 format = '!' + str(len) + 's'
524 format = '!' + str(len) + 's'
525 length = struct.calcsize(format)
525 length = struct.calcsize(format)
526 info = struct.unpack(format, self.data[self.offset:self.offset+length])
526 info = struct.unpack(format, self.data[self.offset:self.offset+length])
527 self.offset += length
527 self.offset += length
528 return info[0]
528 return info[0]
@@ -117,7 +117,7 b' def dorecord(ui, repo, commitfunc, cmdsu'
117 diffopts.nodates = True
117 diffopts.nodates = True
118 diffopts.git = True
118 diffopts.git = True
119 diffopts.showfunc = True
119 diffopts.showfunc = True
120 originaldiff = patch.diff(repo, changes=status, opts=diffopts)
120 originaldiff = patch.diff(repo, changes=status, opts=diffopts)
121 originalchunks = patch.parsepatch(originaldiff)
121 originalchunks = patch.parsepatch(originaldiff)
122
122
123 # 1. filter patch, so we have intending-to apply subset of it
123 # 1. filter patch, so we have intending-to apply subset of it
@@ -2646,7 +2646,7 b' def amend(ui, repo, commitfunc, old, ext'
2646 extra=extra,
2646 extra=extra,
2647 editor=editor)
2647 editor=editor)
2648
2648
2649 newdesc = changelog.stripdesc(new.description())
2649 newdesc = changelog.stripdesc(new.description())
2650 if ((not node)
2650 if ((not node)
2651 and newdesc == old.description()
2651 and newdesc == old.description()
2652 and user == old.user()
2652 and user == old.user()
@@ -3200,9 +3200,9 b' def _performrevert(repo, parents, ctx, a'
3200 diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
3200 diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
3201 diffopts.nodates = True
3201 diffopts.nodates = True
3202 diffopts.git = True
3202 diffopts.git = True
3203 reversehunks = repo.ui.configbool('experimental',
3203 reversehunks = repo.ui.configbool('experimental',
3204 'revertalternateinteractivemode',
3204 'revertalternateinteractivemode',
3205 True)
3205 True)
3206 if reversehunks:
3206 if reversehunks:
3207 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts)
3207 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts)
3208 else:
3208 else:
@@ -3117,7 +3117,7 b' def debugrebuilddirstate(ui, repo, rev, '
3117 manifestonly = manifestfiles - dirstatefiles
3117 manifestonly = manifestfiles - dirstatefiles
3118 dsonly = dirstatefiles - manifestfiles
3118 dsonly = dirstatefiles - manifestfiles
3119 dsnotadded = set(f for f in dsonly if dirstate[f] != 'a')
3119 dsnotadded = set(f for f in dsonly if dirstate[f] != 'a')
3120 changedfiles = manifestonly | dsnotadded
3120 changedfiles = manifestonly | dsnotadded
3121
3121
3122 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3122 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3123 finally:
3123 finally:
@@ -5493,7 +5493,7 b' def postincoming(ui, repo, modheads, opt'
5493 brev = checkout
5493 brev = checkout
5494 movemarkfrom = None
5494 movemarkfrom = None
5495 if not checkout:
5495 if not checkout:
5496 updata = destutil.destupdate(repo)
5496 updata = destutil.destupdate(repo)
5497 checkout, movemarkfrom, brev = updata
5497 checkout, movemarkfrom, brev = updata
5498 ret = hg.update(repo, checkout)
5498 ret = hg.update(repo, checkout)
5499 except error.UpdateAbort as inst:
5499 except error.UpdateAbort as inst:
@@ -6930,7 +6930,7 b' def update(ui, repo, node=None, rev=None'
6930 if check:
6930 if check:
6931 cmdutil.bailifchanged(repo, merge=False)
6931 cmdutil.bailifchanged(repo, merge=False)
6932 if rev is None:
6932 if rev is None:
6933 updata = destutil.destupdate(repo, clean=clean, check=check)
6933 updata = destutil.destupdate(repo, clean=clean, check=check)
6934 rev, movemarkfrom, brev = updata
6934 rev, movemarkfrom, brev = updata
6935
6935
6936 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
6936 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
@@ -389,8 +389,8 b' def makememctx(repo, parents, text, user'
389 extra = {}
389 extra = {}
390 if branch:
390 if branch:
391 extra['branch'] = encoding.fromlocal(branch)
391 extra['branch'] = encoding.fromlocal(branch)
392 ctx = memctx(repo, parents, text, files, getfilectx, user,
392 ctx = memctx(repo, parents, text, files, getfilectx, user,
393 date, extra, editor)
393 date, extra, editor)
394 return ctx
394 return ctx
395
395
396 class changectx(basectx):
396 class changectx(basectx):
@@ -45,7 +45,7 b' def find(name):'
45 '''return module with given extension name'''
45 '''return module with given extension name'''
46 mod = None
46 mod = None
47 try:
47 try:
48 mod = _extensions[name]
48 mod = _extensions[name]
49 except KeyError:
49 except KeyError:
50 for k, v in _extensions.iteritems():
50 for k, v in _extensions.iteritems():
51 if k.endswith('.' + name) or k.endswith('/' + name):
51 if k.endswith('.' + name) or k.endswith('/' + name):
@@ -52,7 +52,7 b' def addbranchrevs(lrepo, other, branches'
52 if not hashbranch and not branches:
52 if not hashbranch and not branches:
53 x = revs or None
53 x = revs or None
54 if util.safehasattr(revs, 'first'):
54 if util.safehasattr(revs, 'first'):
55 y = revs.first()
55 y = revs.first()
56 elif revs:
56 elif revs:
57 y = revs[0]
57 y = revs[0]
58 else:
58 else:
@@ -254,7 +254,7 b' class httppeer(wireproto.wirepeer):'
254 os.unlink(filename)
254 os.unlink(filename)
255
255
256 def _callcompressable(self, cmd, **args):
256 def _callcompressable(self, cmd, **args):
257 stream = self._callstream(cmd, **args)
257 stream = self._callstream(cmd, **args)
258 return util.chunkbuffer(zgenerator(stream))
258 return util.chunkbuffer(zgenerator(stream))
259
259
260 def _abort(self, exception):
260 def _abort(self, exception):
@@ -130,7 +130,7 b' class revlogoldio(object):'
130 def parseindex(self, data, inline):
130 def parseindex(self, data, inline):
131 s = self.size
131 s = self.size
132 index = []
132 index = []
133 nodemap = {nullid: nullrev}
133 nodemap = {nullid: nullrev}
134 n = off = 0
134 n = off = 0
135 l = len(data)
135 l = len(data)
136 while off + s <= l:
136 while off + s <= l:
@@ -2290,7 +2290,7 b' def optimize(x, small):'
2290 elif op == 'not':
2290 elif op == 'not':
2291 # Optimize not public() to _notpublic() because we have a fast version
2291 # Optimize not public() to _notpublic() because we have a fast version
2292 if x[1] == ('func', ('symbol', 'public'), None):
2292 if x[1] == ('func', ('symbol', 'public'), None):
2293 newsym = ('func', ('symbol', '_notpublic'), None)
2293 newsym = ('func', ('symbol', '_notpublic'), None)
2294 o = optimize(newsym, not small)
2294 o = optimize(newsym, not small)
2295 return o[0], o[1]
2295 return o[0], o[1]
2296 else:
2296 else:
@@ -832,7 +832,7 b' def stylelist():'
832 paths = templatepaths()
832 paths = templatepaths()
833 if not paths:
833 if not paths:
834 return _('no templates found, try `hg debuginstall` for more info')
834 return _('no templates found, try `hg debuginstall` for more info')
835 dirlist = os.listdir(paths[0])
835 dirlist = os.listdir(paths[0])
836 stylelist = []
836 stylelist = []
837 for file in dirlist:
837 for file in dirlist:
838 split = file.split(".")
838 split = file.split(".")
@@ -210,7 +210,7 b" elif os.path.exists('.hg_archival.txt'):"
210 kw = dict([[t.strip() for t in l.split(':', 1)]
210 kw = dict([[t.strip() for t in l.split(':', 1)]
211 for l in open('.hg_archival.txt')])
211 for l in open('.hg_archival.txt')])
212 if 'tag' in kw:
212 if 'tag' in kw:
213 version = kw['tag']
213 version = kw['tag']
214 elif 'latesttag' in kw:
214 elif 'latesttag' in kw:
215 if 'changessincelatesttag' in kw:
215 if 'changessincelatesttag' in kw:
216 version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
216 version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
@@ -500,7 +500,7 b' class hginstallscripts(install_scripts):'
500 rest = self.install_dir[len(common):]
500 rest = self.install_dir[len(common):]
501 uplevel = len([n for n in os.path.split(rest) if n])
501 uplevel = len([n for n in os.path.split(rest) if n])
502
502
503 libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common):]
503 libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common):]
504
504
505 for outfile in self.outfiles:
505 for outfile in self.outfiles:
506 fp = open(outfile, 'rb')
506 fp = open(outfile, 'rb')
@@ -1272,7 +1272,7 b' class TestResult(unittest._TextTestResul'
1272 self.warned = []
1272 self.warned = []
1273
1273
1274 self.times = []
1274 self.times = []
1275 self._firststarttime = None
1275 self._firststarttime = None
1276 # Data stored for the benefit of generating xunit reports.
1276 # Data stored for the benefit of generating xunit reports.
1277 self.successes = []
1277 self.successes = []
1278 self.faildata = {}
1278 self.faildata = {}
@@ -187,7 +187,7 b' class basemanifesttests(object):'
187
187
188 def testCopy(self):
188 def testCopy(self):
189 m = self.parsemanifest(A_SHORT_MANIFEST)
189 m = self.parsemanifest(A_SHORT_MANIFEST)
190 m['a'] = BIN_HASH_1
190 m['a'] = BIN_HASH_1
191 m2 = m.copy()
191 m2 = m.copy()
192 del m
192 del m
193 del m2 # make sure we don't double free() anything
193 del m2 # make sure we don't double free() anything
@@ -22,7 +22,7 b' def py_parseindex(data, inline) :'
22 s = 64
22 s = 64
23 cache = None
23 cache = None
24 index = []
24 index = []
25 nodemap = {nullid: nullrev}
25 nodemap = {nullid: nullrev}
26 n = off = 0
26 n = off = 0
27
27
28 l = len(data) - s
28 l = len(data) - s
@@ -29,7 +29,7 b' class ProxyHandler (BaseHTTPServer.BaseH'
29 rbufsize = 0 # self.rfile Be unbuffered
29 rbufsize = 0 # self.rfile Be unbuffered
30
30
31 def handle(self):
31 def handle(self):
32 (ip, port) = self.client_address
32 (ip, port) = self.client_address
33 allowed = getattr(self, 'allowed_clients', None)
33 allowed = getattr(self, 'allowed_clients', None)
34 if allowed is not None and ip not in allowed:
34 if allowed is not None and ip not in allowed:
35 self.raw_requestline = self.rfile.readline()
35 self.raw_requestline = self.rfile.readline()
General Comments 0
You need to be logged in to leave comments. Login now