# HG changeset patch # User Mads Kiilerich # Date 2012-08-15 20:39:18 # Node ID e95ec38f86b0b2a25336188eaf2f32aa0eb2b23f # Parent e7cfe3587ea46140d24ad26a2c21441409f52608 fix wording and not-completely-trivial spelling errors and bad docstrings diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -296,8 +296,8 @@ def standin(filename): '''Return the repo-relative path to the standin for the specified big file.''' # Notes: - # 1) Most callers want an absolute path, but _createstandin() needs - # it repo-relative so lfadd() can pass it to repoadd(). So leave + # 1) Some callers want an absolute path, but for instance addlargefiles + # needs it repo-relative so it can be passed to repoadd(). So leave # it up to the caller to use repo.wjoin() to get an absolute path. # 2) Join with '/' because that's what dirstate always uses, even on # Windows. Change existing separator to '/' first in case we are diff --git a/hgext/largefiles/remotestore.py b/hgext/largefiles/remotestore.py --- a/hgext/largefiles/remotestore.py +++ b/hgext/largefiles/remotestore.py @@ -4,7 +4,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -'''remote largefile store; the base class for servestore''' +'''remote largefile store; the base class for wirestore''' import urllib2 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1522,7 +1522,7 @@ class queue(object): # # this should really read: # mm, dd, aa = repo.status(top, patchparent)[:3] - # but we do it backwards to take advantage of manifest/chlog + # but we do it backwards to take advantage of manifest/changelog # caching against the next repo.status call mm, aa, dd = repo.status(patchparent, top)[:3] changes = repo.changelog.read(top) diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -33,7 +33,7 @@ def scanpatch(fp): - ('file', [header_lines + fromfile + tofile]) - ('context', [context_lines]) - ('hunk', [hunk_lines]) - - ('range', (-start,len, +start,len, diffp)) + - ('range', (-start,len, +start,len, proc)) """ lr = patch.linereader(fp) diff --git a/hgext/schemes.py b/hgext/schemes.py --- a/hgext/schemes.py +++ b/hgext/schemes.py @@ -61,7 +61,7 @@ class ShortRepository(object): return '' % self.scheme def instance(self, ui, url, create): - # Should this use urlmod.url(), or is manual parsing better? + # Should this use the util.url class, or is manual parsing better? url = url.split('://', 1)[1] parts = url.split('/', self.parts) if len(parts) > self.parts: diff --git a/hgext/zeroconf/Zeroconf.py b/hgext/zeroconf/Zeroconf.py --- a/hgext/zeroconf/Zeroconf.py +++ b/hgext/zeroconf/Zeroconf.py @@ -114,7 +114,7 @@ globals()['_GLOBAL_DONE'] = 0 _FLAGS_QR_QUERY = 0x0000 # query _FLAGS_QR_RESPONSE = 0x8000 # response -_FLAGS_AA = 0x0400 # Authorative answer +_FLAGS_AA = 0x0400 # Authoritative answer _FLAGS_TC = 0x0200 # Truncated _FLAGS_RD = 0x0100 # Recursion desired _FLAGS_RA = 0x8000 # Recursion available @@ -650,7 +650,7 @@ class DNSOutgoing(object): if now == 0 or not record.isExpired(now): self.answers.append((record, now)) - def addAuthorativeAnswer(self, record): + def addAuthoritativeAnswer(self, record): """Adds an authoritative answer""" self.authorities.append(record) @@ -1433,7 +1433,7 @@ class Zeroconf(object): out = DNSOutgoing(_FLAGS_QR_QUERY | _FLAGS_AA) self.debug = out out.addQuestion(DNSQuestion(info.type, _TYPE_PTR, _CLASS_IN)) - out.addAuthorativeAnswer(DNSPointer(info.type, _TYPE_PTR, _CLASS_IN, _DNS_TTL, info.name)) + out.addAuthoritativeAnswer(DNSPointer(info.type, _TYPE_PTR, _CLASS_IN, _DNS_TTL, info.name)) self.send(out) i += 1 nextTime += _CHECK_TIME diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -58,7 +58,7 @@ def readcurrent(repo): raise return None try: - # No readline() in posixfile_nt, reading everything is cheap + # No readline() in osutil.posixfile, reading everything is cheap mark = encoding.tolocal((file.readlines() or [''])[0]) if mark == '' or mark not in repo._bookmarks: mark = None diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1352,20 +1352,20 @@ def commit(ui, repo, *pats, **opts): # printed anyway. # # Par Msg Comment - # NN y additional topo root + # N N y additional topo root # - # BN y additional branch root - # CN y additional topo head - # HN n usual case + # B N y additional branch root + # C N y additional topo head + # H N n usual case # - # BB y weird additional branch root - # CB y branch merge - # HB n merge with named branch + # B B y weird additional branch root + # C B y branch merge + # H B n merge with named branch # - # CC y additional head from merge - # CH n merge with a head + # C C y additional head from merge + # C H n merge with a head # - # HH n head merge: head count decreases + # H H n head merge: head count decreases if not opts.get('close_branch'): for r in parents: diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -137,7 +137,7 @@ class server(object): if logpath: global logfile if logpath == '-': - # write log on a special 'd'ebug channel + # write log on a special 'd' (debug) channel logfile = channeledoutput(sys.stdout, sys.stdout, 'd') else: logfile = open(logpath, 'a') diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -67,7 +67,7 @@ class config(object): return self._data.get(section, {}).get(item, default) def backup(self, section, item): - """return a tuple allowing restore to reinstall a previous valuesi + """return a tuple allowing restore to reinstall previous values The main reason we need it is because it handle the "no data" case. """ diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1167,7 +1167,7 @@ class workingfilectx(filectx): returns True if different than fctx. """ - # fctx should be a filectx (not a wfctx) + # fctx should be a filectx (not a workingfilectx) # invert comparison to reuse the same code path return fctx.cmp(self) diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -49,7 +49,7 @@ class match(object): a pattern is one of: 'glob:' - a glob relative to cwd 're:' - a regular expression - 'path:' - a path relative to canonroot + 'path:' - a path relative to repository root 'relglob:' - an unrooted glob (*.c matches C files in all dirs) 'relpath:' - a path relative to cwd 'relre:' - a regexp that needn't match the start of a name diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -318,7 +318,7 @@ def successormarkers(ctx): def anysuccessors(obsstore, node): """Yield every successor of - This this a linear yield unsuitable to detect splitted changeset.""" + This is a linear yield unsuitable to detect split changesets.""" remaining = set([node]) seen = set(remaining) while remaining: diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -363,7 +363,7 @@ def newheads(repo, heads, roots): """compute new head of a subset minus another * `heads`: define the first subset - * `roots`: define the second we substract to the first""" + * `roots`: define the second we subtract from the first""" revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))', heads, roots, roots, heads) return [c.node() for c in revset] diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -70,7 +70,7 @@ def parse_index2(data, inline): def parse_dirstate(dmap, copymap, st): parents = [st[:20], st[20: 40]] - # deref fields so they will be local in loop + # dereference fields so they will be local in loop format = ">cllll" e_size = struct.calcsize(format) pos1 = 40 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1477,7 +1477,11 @@ def parsebool(s): for a in _hexdig for b in _hexdig) def _urlunquote(s): - """unquote('abc%20def') -> 'abc def'.""" + """Decode HTTP/HTML % encoding. + + >>> _urlunquote('abc%20def') + 'abc def' + """ res = s.split('%') # fastpath if len(res) == 1: