##// END OF EJS Templates
fix wording and not-completely-trivial spelling errors and bad docstrings
Mads Kiilerich -
r17425:e95ec38f default
parent child Browse files
Show More
@@ -296,8 +296,8 b' def standin(filename):'
296 '''Return the repo-relative path to the standin for the specified big
296 '''Return the repo-relative path to the standin for the specified big
297 file.'''
297 file.'''
298 # Notes:
298 # Notes:
299 # 1) Most callers want an absolute path, but _createstandin() needs
299 # 1) Some callers want an absolute path, but for instance addlargefiles
300 # it repo-relative so lfadd() can pass it to repoadd(). So leave
300 # needs it repo-relative so it can be passed to repoadd(). So leave
301 # it up to the caller to use repo.wjoin() to get an absolute path.
301 # it up to the caller to use repo.wjoin() to get an absolute path.
302 # 2) Join with '/' because that's what dirstate always uses, even on
302 # 2) Join with '/' because that's what dirstate always uses, even on
303 # Windows. Change existing separator to '/' first in case we are
303 # Windows. Change existing separator to '/' first in case we are
@@ -4,7 +4,7 b''
4 # This software may be used and distributed according to the terms of the
4 # This software may be used and distributed according to the terms of the
5 # GNU General Public License version 2 or any later version.
5 # GNU General Public License version 2 or any later version.
6
6
7 '''remote largefile store; the base class for servestore'''
7 '''remote largefile store; the base class for wirestore'''
8
8
9 import urllib2
9 import urllib2
10
10
@@ -1522,7 +1522,7 b' class queue(object):'
1522 #
1522 #
1523 # this should really read:
1523 # this should really read:
1524 # mm, dd, aa = repo.status(top, patchparent)[:3]
1524 # mm, dd, aa = repo.status(top, patchparent)[:3]
1525 # but we do it backwards to take advantage of manifest/chlog
1525 # but we do it backwards to take advantage of manifest/changelog
1526 # caching against the next repo.status call
1526 # caching against the next repo.status call
1527 mm, aa, dd = repo.status(patchparent, top)[:3]
1527 mm, aa, dd = repo.status(patchparent, top)[:3]
1528 changes = repo.changelog.read(top)
1528 changes = repo.changelog.read(top)
@@ -33,7 +33,7 b' def scanpatch(fp):'
33 - ('file', [header_lines + fromfile + tofile])
33 - ('file', [header_lines + fromfile + tofile])
34 - ('context', [context_lines])
34 - ('context', [context_lines])
35 - ('hunk', [hunk_lines])
35 - ('hunk', [hunk_lines])
36 - ('range', (-start,len, +start,len, diffp))
36 - ('range', (-start,len, +start,len, proc))
37 """
37 """
38 lr = patch.linereader(fp)
38 lr = patch.linereader(fp)
39
39
@@ -61,7 +61,7 b' class ShortRepository(object):'
61 return '<ShortRepository: %s>' % self.scheme
61 return '<ShortRepository: %s>' % self.scheme
62
62
63 def instance(self, ui, url, create):
63 def instance(self, ui, url, create):
64 # Should this use urlmod.url(), or is manual parsing better?
64 # Should this use the util.url class, or is manual parsing better?
65 url = url.split('://', 1)[1]
65 url = url.split('://', 1)[1]
66 parts = url.split('/', self.parts)
66 parts = url.split('/', self.parts)
67 if len(parts) > self.parts:
67 if len(parts) > self.parts:
@@ -114,7 +114,7 b" globals()['_GLOBAL_DONE'] = 0"
114 _FLAGS_QR_QUERY = 0x0000 # query
114 _FLAGS_QR_QUERY = 0x0000 # query
115 _FLAGS_QR_RESPONSE = 0x8000 # response
115 _FLAGS_QR_RESPONSE = 0x8000 # response
116
116
117 _FLAGS_AA = 0x0400 # Authorative answer
117 _FLAGS_AA = 0x0400 # Authoritative answer
118 _FLAGS_TC = 0x0200 # Truncated
118 _FLAGS_TC = 0x0200 # Truncated
119 _FLAGS_RD = 0x0100 # Recursion desired
119 _FLAGS_RD = 0x0100 # Recursion desired
120 _FLAGS_RA = 0x8000 # Recursion available
120 _FLAGS_RA = 0x8000 # Recursion available
@@ -650,7 +650,7 b' class DNSOutgoing(object):'
650 if now == 0 or not record.isExpired(now):
650 if now == 0 or not record.isExpired(now):
651 self.answers.append((record, now))
651 self.answers.append((record, now))
652
652
653 def addAuthorativeAnswer(self, record):
653 def addAuthoritativeAnswer(self, record):
654 """Adds an authoritative answer"""
654 """Adds an authoritative answer"""
655 self.authorities.append(record)
655 self.authorities.append(record)
656
656
@@ -1433,7 +1433,7 b' class Zeroconf(object):'
1433 out = DNSOutgoing(_FLAGS_QR_QUERY | _FLAGS_AA)
1433 out = DNSOutgoing(_FLAGS_QR_QUERY | _FLAGS_AA)
1434 self.debug = out
1434 self.debug = out
1435 out.addQuestion(DNSQuestion(info.type, _TYPE_PTR, _CLASS_IN))
1435 out.addQuestion(DNSQuestion(info.type, _TYPE_PTR, _CLASS_IN))
1436 out.addAuthorativeAnswer(DNSPointer(info.type, _TYPE_PTR, _CLASS_IN, _DNS_TTL, info.name))
1436 out.addAuthoritativeAnswer(DNSPointer(info.type, _TYPE_PTR, _CLASS_IN, _DNS_TTL, info.name))
1437 self.send(out)
1437 self.send(out)
1438 i += 1
1438 i += 1
1439 nextTime += _CHECK_TIME
1439 nextTime += _CHECK_TIME
@@ -58,7 +58,7 b' def readcurrent(repo):'
58 raise
58 raise
59 return None
59 return None
60 try:
60 try:
61 # No readline() in posixfile_nt, reading everything is cheap
61 # No readline() in osutil.posixfile, reading everything is cheap
62 mark = encoding.tolocal((file.readlines() or [''])[0])
62 mark = encoding.tolocal((file.readlines() or [''])[0])
63 if mark == '' or mark not in repo._bookmarks:
63 if mark == '' or mark not in repo._bookmarks:
64 mark = None
64 mark = None
@@ -137,7 +137,7 b' class server(object):'
137 if logpath:
137 if logpath:
138 global logfile
138 global logfile
139 if logpath == '-':
139 if logpath == '-':
140 # write log on a special 'd'ebug channel
140 # write log on a special 'd' (debug) channel
141 logfile = channeledoutput(sys.stdout, sys.stdout, 'd')
141 logfile = channeledoutput(sys.stdout, sys.stdout, 'd')
142 else:
142 else:
143 logfile = open(logpath, 'a')
143 logfile = open(logpath, 'a')
@@ -67,7 +67,7 b' class config(object):'
67 return self._data.get(section, {}).get(item, default)
67 return self._data.get(section, {}).get(item, default)
68
68
69 def backup(self, section, item):
69 def backup(self, section, item):
70 """return a tuple allowing restore to reinstall a previous valuesi
70 """return a tuple allowing restore to reinstall previous values
71
71
72 The main reason we need it is because it handle the "no data" case.
72 The main reason we need it is because it handle the "no data" case.
73 """
73 """
@@ -1167,7 +1167,7 b' class workingfilectx(filectx):'
1167
1167
1168 returns True if different than fctx.
1168 returns True if different than fctx.
1169 """
1169 """
1170 # fctx should be a filectx (not a wfctx)
1170 # fctx should be a filectx (not a workingfilectx)
1171 # invert comparison to reuse the same code path
1171 # invert comparison to reuse the same code path
1172 return fctx.cmp(self)
1172 return fctx.cmp(self)
1173
1173
@@ -49,7 +49,7 b' class match(object):'
49 a pattern is one of:
49 a pattern is one of:
50 'glob:<glob>' - a glob relative to cwd
50 'glob:<glob>' - a glob relative to cwd
51 're:<regexp>' - a regular expression
51 're:<regexp>' - a regular expression
52 'path:<path>' - a path relative to canonroot
52 'path:<path>' - a path relative to repository root
53 'relglob:<glob>' - an unrooted glob (*.c matches C files in all dirs)
53 'relglob:<glob>' - an unrooted glob (*.c matches C files in all dirs)
54 'relpath:<path>' - a path relative to cwd
54 'relpath:<path>' - a path relative to cwd
55 'relre:<regexp>' - a regexp that needn't match the start of a name
55 'relre:<regexp>' - a regexp that needn't match the start of a name
@@ -318,7 +318,7 b' def successormarkers(ctx):'
318 def anysuccessors(obsstore, node):
318 def anysuccessors(obsstore, node):
319 """Yield every successor of <node>
319 """Yield every successor of <node>
320
320
321 This this a linear yield unsuitable to detect splitted changeset."""
321 This is a linear yield unsuitable to detect split changesets."""
322 remaining = set([node])
322 remaining = set([node])
323 seen = set(remaining)
323 seen = set(remaining)
324 while remaining:
324 while remaining:
@@ -363,7 +363,7 b' def newheads(repo, heads, roots):'
363 """compute new head of a subset minus another
363 """compute new head of a subset minus another
364
364
365 * `heads`: define the first subset
365 * `heads`: define the first subset
366 * `roots`: define the second we substract to the first"""
366 * `roots`: define the second we subtract from the first"""
367 revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
367 revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
368 heads, roots, roots, heads)
368 heads, roots, roots, heads)
369 return [c.node() for c in revset]
369 return [c.node() for c in revset]
@@ -70,7 +70,7 b' def parse_index2(data, inline):'
70
70
71 def parse_dirstate(dmap, copymap, st):
71 def parse_dirstate(dmap, copymap, st):
72 parents = [st[:20], st[20: 40]]
72 parents = [st[:20], st[20: 40]]
73 # deref fields so they will be local in loop
73 # dereference fields so they will be local in loop
74 format = ">cllll"
74 format = ">cllll"
75 e_size = struct.calcsize(format)
75 e_size = struct.calcsize(format)
76 pos1 = 40
76 pos1 = 40
@@ -1477,7 +1477,11 b' def parsebool(s):'
1477 for a in _hexdig for b in _hexdig)
1477 for a in _hexdig for b in _hexdig)
1478
1478
1479 def _urlunquote(s):
1479 def _urlunquote(s):
1480 """unquote('abc%20def') -> 'abc def'."""
1480 """Decode HTTP/HTML % encoding.
1481
1482 >>> _urlunquote('abc%20def')
1483 'abc def'
1484 """
1481 res = s.split('%')
1485 res = s.split('%')
1482 # fastpath
1486 # fastpath
1483 if len(res) == 1:
1487 if len(res) == 1:
General Comments 0
You need to be logged in to leave comments. Login now