[PATCH 2 of 2] fix wording and not-completely-trivial spelling errors and bad docstrings
Mads Kiilerich
mads at kiilerich.com
Tue Aug 14 19:22:52 CDT 2012
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1344989263 -7200
# Node ID 7677b03e2c73e67455712f38653388b4f8f8fcc3
# Parent c271e69d350f7a6812a763f3bb66e6e5b91d38ad
fix wording and not-completely-trivial spelling errors and bad docstrings
diff --git a/hgext/convert/monotone.py b/hgext/convert/monotone.py
--- a/hgext/convert/monotone.py
+++ b/hgext/convert/monotone.py
@@ -225,7 +225,6 @@
return [self.rev]
def getchanges(self, rev):
- #revision = self.mtncmd("get_revision %s" % rev).split("\n\n")
revision = self.mtnrun("get_revision", rev).split("\n\n")
files = {}
ignoremove = {}
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 @@
'''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 @@
#
# 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
# 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 @@
- ('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 @@
return '<ShortRepository: %s>' % 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 @@
_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 @@
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 @@
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/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1352,20 +1352,20 @@
# 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 @@
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 @@
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 @@
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 @@
a pattern is one of:
'glob:<glob>' - a glob relative to cwd
're:<regexp>' - a regular expression
- 'path:<path>' - a path relative to canonroot
+ 'path:<path>' - a path relative to (repository) root
'relglob:<glob>' - an unrooted glob (*.c matches C files in all dirs)
'relpath:<path>' - a path relative to cwd
'relre:<regexp>' - 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
@@ -55,10 +55,6 @@
from mercurial import util, base85
from i18n import _
-# the obsolete feature is not mature enought to be enabled by default.
-# you have to rely on third party extension extension to enable this.
-_enabled = False
-
_pack = struct.pack
_unpack = struct.unpack
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_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/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -84,9 +84,6 @@
abortwhenunrelated=True):
'''Return a tuple (common, anyincoming, remoteheads) used to identify
missing nodes from or in remote.
-
- shortcutlocal determines whether we try use direct access to localrepo if
- remote is actually local.
'''
roundtrips = 0
cl = local.changelog
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1478,7 +1478,11 @@
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:
More information about the Mercurial-devel
mailing list