changeset 17436:4986cb7a8f6e

Merge
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 04 Sep 2012 13:49:10 -0700
parents c954447336e1 (diff) 31c123a2f273 (current diff)
children fbb732a8f2b9
files
diffstat 94 files changed, 440 insertions(+), 314 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/check-code.py	Tue Sep 04 13:49:10 2012 -0700
@@ -136,7 +136,7 @@
     (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
     (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
-     r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
+     r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'),
     (r'.{81}', "line too long"),
     (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
     (r'[^\n]\Z', "no trailing newline"),
@@ -190,8 +190,8 @@
      'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'),
     (r'opener\([^)]*\).read\(',
      "use opener.read() instead"),
-    (r'BaseException', 'not in Py2.4, use Exception'),
-    (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'),
+    (r'BaseException', 'not in Python 2.4, use Exception'),
+    (r'os\.path\.relpath', 'os.path.relpath is not in Python 2.5'),
     (r'opener\([^)]*\).write\(',
      "use opener.write() instead"),
     (r'[\s\(](open|file)\([^)]*\)\.read\(',
@@ -321,7 +321,7 @@
     :f: filepath
     :logfunc: function used to report error
               logfunc(filename, linenumber, linecontent, errormessage)
-    :maxerr: number of error to display before arborting.
+    :maxerr: number of error to display before aborting.
              Set to false (default) to report all errors
 
     return True if no error is found, False otherwise.
@@ -365,7 +365,7 @@
                 p, msg = pat
                 ignore = None
 
-            # fix-up regexes for multiline searches
+            # fix-up regexes for multi-line searches
             po = p
             # \s doesn't match \n
             p = re.sub(r'(?<!\\)\\s', r'[ \\t]', p)
--- a/contrib/mergetools.hgrc	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/mergetools.hgrc	Tue Sep 04 13:49:10 2012 -0700
@@ -16,6 +16,7 @@
 gvimdiff.priority=-9
 
 vimdiff.args=$local $other $base
+vimdiff.check=changed
 vimdiff.priority=-10
 
 merge.checkconflicts=True
--- a/contrib/vim/hgcommand.vim	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/vim/hgcommand.vim	Tue Sep 04 13:49:10 2012 -0700
@@ -1442,7 +1442,7 @@
 
                                                  *hgcommand-mappings-override*
 
-   The default mappings can be overriden by user-provided instead by mapping
+   The default mappings can be overridden by user-provided instead by mapping
    to <Plug>CommandName.  This is especially useful when these mappings
    collide with other existing mappings (vim will warn of this during plugin
    initialization, but will not clobber the existing mappings).
--- a/contrib/vim/patchreview.vim	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/vim/patchreview.vim	Tue Sep 04 13:49:10 2012 -0700
@@ -55,7 +55,7 @@
 "   3) Optional (but recommended for speed)
 "
 "      Install patchutils ( http://cyberelk.net/tim/patchutils/ ) for your
-"      OS. For windows it is availble from Cygwin
+"      OS. For windows it is available from Cygwin
 "
 "         http://www.cygwin.com
 "
--- a/contrib/win32/hgwebdir_wsgi.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/win32/hgwebdir_wsgi.py	Tue Sep 04 13:49:10 2012 -0700
@@ -27,7 +27,7 @@
 #   On 64-bit systems, make sure it's assigned a 32-bit app pool.
 #
 # - In the application, setup a wildcard script handler mapping of type
-#   IpsapiModule with the shim dll as its executable. This file MUST reside
+#   IsapiModule with the shim dll as its executable. This file MUST reside
 #   in the same directory as the shim. Remove all other handlers, if you wish.
 #
 # - Make sure the ISAPI and CGI restrictions (configured globally on the
--- a/contrib/wix/guids.wxi	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/wix/guids.wxi	Tue Sep 04 13:49:10 2012 -0700
@@ -27,10 +27,10 @@
   <?define templates.root.guid = {8DF97574-33E9-412F-8414-65B48BB18783} ?>
   <?define templates.atom.guid = {AB5D2908-BC95-44BE-9D79-069EF43D93E2} ?>
   <?define templates.coal.guid = {B63CCAAB-4EAF-43b4-901E-4BD13F5B78FC} ?>
-  <?define templates.gitweb.guid = {6A33D168-F84E-45AA-912C-23CAC2D66BCA} ?>
-  <?define templates.monoblue.guid = {D27AA750-9394-4DAC-84FC-A546CE8F347A} ?>
-  <?define templates.paper.guid = {D2591E56-709E-49F9-8A5F-1359E1CCD7E0} ?>
-  <?define templates.raw.guid = {04DE03A2-FBFD-4c5f-8DEA-5436DDF4689D} ?>
+  <?define templates.gitweb.guid = {827334AF-1EFD-421B-962C-5660A068F612} ?>
+  <?define templates.monoblue.guid = {8060A1E4-BD4C-453E-92CB-9536DC44A9E3} ?>
+  <?define templates.paper.guid = {61AB1DE9-645F-46ED-8AF8-0CF02267FFBB} ?>
+  <?define templates.raw.guid = {3F88E9B6-EA3C-41EB-8D8A-3F12E7DE9933} ?>
   <?define templates.rss.guid = {36069748-1E2A-472B-A212-506CB656A9C1} ?>
   <?define templates.spartan.guid = {80222625-FA8F-44b1-86CE-1781EF375D09} ?>
   <?define templates.static.guid = {B27D7311-050A-4A96-9971-B674A0EA21D0} ?>
--- a/contrib/wix/templates.wxs	Tue Aug 21 16:06:34 2012 -0700
+++ b/contrib/wix/templates.wxs	Tue Sep 04 13:49:10 2012 -0700
@@ -33,7 +33,6 @@
           <File Name="map-cmdline.default" />
           <File Name="map-cmdline.bisect" />
           <File Name="map-cmdline.xml" />
-          <File Name="template-vars.txt" />
         </Component>
 
         <Directory Id="templates.atomdir" Name="atom">
@@ -67,6 +66,7 @@
             <File Id="gitweb.changeset.tmpl"      Name="changeset.tmpl" />
             <File Id="gitweb.error.tmpl"          Name="error.tmpl" />
             <File Id="gitweb.fileannotate.tmpl"   Name="fileannotate.tmpl" />
+            <File Id="gitweb.filecomparison.tmpl" Name="filecomparison.tmpl" />
             <File Id="gitweb.filediff.tmpl"       Name="filediff.tmpl" />
             <File Id="gitweb.filelog.tmpl"        Name="filelog.tmpl" />
             <File Id="gitweb.filerevision.tmpl"   Name="filerevision.tmpl" />
@@ -95,6 +95,7 @@
             <File Id="monoblue.changeset.tmpl"      Name="changeset.tmpl" />
             <File Id="monoblue.error.tmpl"          Name="error.tmpl" />
             <File Id="monoblue.fileannotate.tmpl"   Name="fileannotate.tmpl" />
+            <File Id="monoblue.filecomparison.tmpl" Name="filecomparison.tmpl" />
             <File Id="monoblue.filediff.tmpl"       Name="filediff.tmpl" />
             <File Id="monoblue.filelog.tmpl"        Name="filelog.tmpl" />
             <File Id="monoblue.filerevision.tmpl"   Name="filerevision.tmpl" />
@@ -122,6 +123,7 @@
             <File Id="paper.diffstat.tmpl"      Name="diffstat.tmpl" />
             <File Id="paper.error.tmpl"         Name="error.tmpl" />
             <File Id="paper.fileannotate.tmpl"  Name="fileannotate.tmpl" />
+            <File Id="paper.filecomparison.tmpl" Name="filecomparison.tmpl" />
             <File Id="paper.filediff.tmpl"      Name="filediff.tmpl" />
             <File Id="paper.filelog.tmpl"       Name="filelog.tmpl" />
             <File Id="paper.filelogentry.tmpl"  Name="filelogentry.tmpl" />
@@ -148,6 +150,9 @@
             <File Id="raw.error.tmpl"        Name="error.tmpl" />
             <File Id="raw.fileannotate.tmpl" Name="fileannotate.tmpl" />
             <File Id="raw.filediff.tmpl"     Name="filediff.tmpl" />
+            <File Id="raw.graph.tmpl"        Name="graph.tmpl" />
+            <File Id="raw.graphedge.tmpl"    Name="graphedge.tmpl" />
+            <File Id="raw.graphnode.tmpl"    Name="graphnode.tmpl" />
             <File Id="raw.index.tmpl"        Name="index.tmpl" />
             <File Id="raw.manifest.tmpl"     Name="manifest.tmpl" />
             <File Id="raw.map"               Name="map" />
--- a/hgext/bugzilla.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/bugzilla.py	Tue Sep 04 13:49:10 2012 -0700
@@ -516,7 +516,7 @@
             raise util.Abort(_('unknown database schema'))
         return ids[0][0]
 
-# Buzgilla via XMLRPC interface.
+# Bugzilla via XMLRPC interface.
 
 class cookietransportrequest(object):
     """A Transport request method that retains cookies over its lifetime.
--- a/hgext/color.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/color.py	Tue Sep 04 13:49:10 2012 -0700
@@ -499,5 +499,5 @@
                 orig(m.group(2), **opts)
                 m = re.match(ansire, m.group(3))
         finally:
-            # Explicity reset original attributes
+            # Explicitly reset original attributes
             _kernel32.SetConsoleTextAttribute(stdout, origattr)
--- a/hgext/convert/__init__.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/__init__.py	Tue Sep 04 13:49:10 2012 -0700
@@ -74,7 +74,7 @@
 
     The authormap is a simple text file that maps each source commit
     author to a destination commit author. It is handy for source SCMs
-    that use unix logins to identify authors (eg: CVS). One line per
+    that use unix logins to identify authors (e.g.: CVS). One line per
     author mapping and the line format is::
 
       source author = destination author
--- a/hgext/convert/bzr.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/bzr.py	Tue Sep 04 13:49:10 2012 -0700
@@ -246,7 +246,7 @@
                         # register the change as move
                         renames[topath] = frompath
 
-                # no futher changes, go to the next change
+                # no further changes, go to the next change
                 continue
 
             # we got unicode paths, need to convert them
--- a/hgext/convert/convcmd.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/convcmd.py	Tue Sep 04 13:49:10 2012 -0700
@@ -167,7 +167,7 @@
 
     def toposort(self, parents, sortmode):
         '''Return an ordering such that every uncommitted changeset is
-        preceeded by all its uncommitted ancestors.'''
+        preceded by all its uncommitted ancestors.'''
 
         def mapchildren(parents):
             """Return a (children, roots) tuple where 'children' maps parent
--- a/hgext/convert/cvs.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/cvs.py	Tue Sep 04 13:49:10 2012 -0700
@@ -202,7 +202,7 @@
     def getfile(self, name, rev):
 
         def chunkedread(fp, count):
-            # file-objects returned by socked.makefile() do not handle
+            # file-objects returned by socket.makefile() do not handle
             # large read() requests very well.
             chunksize = 65536
             output = StringIO()
--- a/hgext/convert/cvsps.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/cvsps.py	Tue Sep 04 13:49:10 2012 -0700
@@ -156,8 +156,8 @@
         # The cvsps cache pickle needs a uniquified name, based on the
         # repository location. The address may have all sort of nasties
         # in it, slashes, colons and such. So here we take just the
-        # alphanumerics, concatenated in a way that does not mix up the
-        # various components, so that
+        # alphanumeric characters, concatenated in a way that does not
+        # mix up the various components, so that
         #    :pserver:user@server:/path
         # and
         #    /pserver/user/server/path
@@ -503,7 +503,7 @@
 
         # Check if log entry belongs to the current changeset or not.
 
-        # Since CVS is file centric, two different file revisions with
+        # Since CVS is file-centric, two different file revisions with
         # different branchpoints should be treated as belonging to two
         # different changesets (and the ordering is important and not
         # honoured by cvsps at this point).
--- a/hgext/convert/gnuarch.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/gnuarch.py	Tue Sep 04 13:49:10 2012 -0700
@@ -89,7 +89,7 @@
 
             # Get the complete list of revisions for that tree version
             output, status = self.runlines('revisions', '-r', '-f', treeversion)
-            self.checkexit(status, 'failed retrieveing revisions for %s'
+            self.checkexit(status, 'failed retrieving revisions for %s'
                            % treeversion)
 
             # No new iteration unless a revision has a continuation-of header
--- a/hgext/convert/monotone.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/monotone.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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 = {}
--- a/hgext/convert/subversion.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/convert/subversion.py	Tue Sep 04 13:49:10 2012 -0700
@@ -887,8 +887,8 @@
             io = StringIO()
             info = svn.ra.get_file(self.ra, file, revnum, io)
             data = io.getvalue()
-            # ra.get_files() seems to keep a reference on the input buffer
-            # preventing collection. Release it explicitely.
+            # ra.get_file() seems to keep a reference on the input buffer
+            # preventing collection. Release it explicitly.
             io.close()
             if isinstance(info, list):
                 info = info[-1]
@@ -923,7 +923,7 @@
         # Given the repository url of this wc, say
         #   "http://server/plone/CMFPlone/branches/Plone-2_0-branch"
         # extract the "entry" portion (a relative path) from what
-        # svn log --xml says, ie
+        # svn log --xml says, i.e.
         #   "/CMFPlone/branches/Plone-2_0-branch/tests/PloneTestCase.py"
         # that is to say "tests/PloneTestCase.py"
         if path.startswith(module):
--- a/hgext/extdiff.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/extdiff.py	Tue Sep 04 13:49:10 2012 -0700
@@ -109,7 +109,7 @@
     return dirname, fns_and_mtime
 
 def dodiff(ui, repo, diffcmd, diffopts, pats, opts):
-    '''Do the actuall diff:
+    '''Do the actual diff:
 
     - copy to a temp structure if diffing 2 internal revisions
     - copy to a temp structure if diffing working revision with
--- a/hgext/hgcia.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/hgcia.py	Tue Sep 04 13:49:10 2012 -0700
@@ -22,7 +22,7 @@
   # Style to use (optional)
   #style = foo
   # The URL of the CIA notification service (optional)
-  # You can use mailto: URLs to send by email, eg
+  # You can use mailto: URLs to send by email, e.g.
   # mailto:cia@cia.vc
   # Make sure to set email.from if you do this.
   #url = http://cia.vc/
--- a/hgext/inotify/linux/watcher.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/inotify/linux/watcher.py	Tue Sep 04 13:49:10 2012 -0700
@@ -282,7 +282,7 @@
         callable that takes one parameter.  It will be called each time
         a directory is about to be automatically watched.  If it returns
         True, the directory will be watched if it still exists,
-        otherwise, it will beb skipped.'''
+        otherwise, it will be skipped.'''
 
         super(autowatcher, self).__init__()
         self.addfilter = addfilter
--- a/hgext/keyword.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/keyword.py	Tue Sep 04 13:49:10 2012 -0700
@@ -7,7 +7,7 @@
 #
 # $Id$
 #
-# Keyword expansion hack against the grain of a DSCM
+# Keyword expansion hack against the grain of a Distributed SCM
 #
 # There are many good reasons why this is not needed in a distributed
 # SCM, still it may be useful in very small projects based on single
@@ -168,7 +168,7 @@
     return subfunc(r'$\1$', text)
 
 def _preselect(wstatus, changed):
-    '''Retrieves modfied and added files from a working directory state
+    '''Retrieves modified and added files from a working directory state
     and returns the subset of each contained in given changed files
     retrieved from a change context.'''
     modified, added = wstatus[:2]
--- a/hgext/largefiles/basestore.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/basestore.py	Tue Sep 04 13:49:10 2012 -0700
@@ -55,7 +55,7 @@
     def get(self, files):
         '''Get the specified largefiles from the store and write to local
         files under repo.root.  files is a list of (filename, hash)
-        tuples.  Return (success, missing), lists of files successfuly
+        tuples.  Return (success, missing), lists of files successfully
         downloaded and those not found in the store.  success is a list
         of (filename, hash) tuples; missing is a list of filenames that
         we could not get.  (The detailed error message will already have
--- a/hgext/largefiles/lfcommands.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/lfcommands.py	Tue Sep 04 13:49:10 2012 -0700
@@ -65,7 +65,7 @@
         dstlock = rdst.lock()
 
         # Get a list of all changesets in the source.  The easy way to do this
-        # is to simply walk the changelog, using changelog.nodesbewteen().
+        # is to simply walk the changelog, using changelog.nodesbetween().
         # Take a look at mercurial/revlog.py:639 for more details.
         # Use a generator instead of a list to decrease memory usage
         ctxs = (rsrc[ctx] for ctx in rsrc.changelog.nodesbetween(None,
@@ -177,7 +177,7 @@
         if f not in lfiles and f not in normalfiles:
             islfile = _islfile(f, ctx, matcher, size)
             # If this file was renamed or copied then copy
-            # the lfileness of its predecessor
+            # the largefile-ness of its predecessor
             if f in ctx.manifest():
                 fctx = ctx.filectx(f)
                 renamed = fctx.renamed()
@@ -389,7 +389,7 @@
         # If we are mid-merge, then we have to trust the standin that is in the
         # working copy to have the correct hashvalue.  This is because the
         # original hg.merge() already updated the standin as part of the normal
-        # merge process -- we just have to udpate the largefile to match.
+        # merge process -- we just have to update the largefile to match.
         if (getattr(repo, "_ismerging", False) and
              os.path.exists(repo.wjoin(lfutil.standin(lfile)))):
             expectedhash = lfutil.readstandin(repo, lfile)
@@ -444,11 +444,13 @@
             cachelfiles(ui, repo, '.', lfiles)
 
         updated, removed = 0, 0
-        for i in map(lambda f: _updatelfile(repo, lfdirstate, f), lfiles):
-            # increment the appropriate counter according to _updatelfile's
-            # return value
-            updated += i > 0 and i or 0
-            removed -= i < 0 and i or 0
+        for f in lfiles:
+            i = _updatelfile(repo, lfdirstate, f)
+            if i:
+                if i > 0:
+                    updated += i
+                else:
+                    removed -= i
             if printmessage and (removed or updated) and not printed:
                 ui.status(_('getting changed largefiles\n'))
                 printed = True
--- a/hgext/largefiles/lfutil.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/lfutil.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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
--- a/hgext/largefiles/localstore.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/localstore.py	Tue Sep 04 13:49:10 2012 -0700
@@ -18,7 +18,7 @@
 
 class localstore(basestore.basestore):
     '''localstore first attempts to grab files out of the store in the remote
-    Mercurial repository.  Failling that, it attempts to grab the files from
+    Mercurial repository.  Failing that, it attempts to grab the files from
     the user cache.'''
 
     def __init__(self, ui, repo, remote):
--- a/hgext/largefiles/overrides.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/overrides.py	Tue Sep 04 13:49:10 2012 -0700
@@ -155,7 +155,7 @@
             ui.status(_('removing %s\n') % m.rel(f))
 
     # Need to lock because standin files are deleted then removed from the
-    # repository and we could race inbetween.
+    # repository and we could race in-between.
     wlock = repo.wlock()
     try:
         lfdirstate = lfutil.openlfdirstate(ui, repo)
@@ -251,7 +251,7 @@
 
 # Override needs to refresh standins so that update's normal merge
 # will go through properly. Then the other update hook (overriding repo.update)
-# will get the new files. Filemerge is also overriden so that the merge
+# will get the new files. Filemerge is also overridden so that the merge
 # will merge standins correctly.
 def overrideupdate(orig, ui, repo, *pats, **opts):
     lfdirstate = lfutil.openlfdirstate(ui, repo)
@@ -696,7 +696,7 @@
         result = orig(ui, repo, source, **opts)
         # If we do not have the new largefiles for any new heads we pulled, we
         # will run into a problem later if we try to merge or rebase with one of
-        # these heads, so cache the largefiles now direclty into the system
+        # these heads, so cache the largefiles now directly into the system
         # cache.
         ui.status(_("caching new largefiles\n"))
         numcached = 0
@@ -912,7 +912,7 @@
             ui.status(_('removing %s\n') % m.rel(f))
 
     # Need to lock because standin files are deleted then removed from the
-    # repository and we could race inbetween.
+    # repository and we could race in-between.
     wlock = repo.wlock()
     try:
         lfdirstate = lfutil.openlfdirstate(ui, repo)
--- a/hgext/largefiles/remotestore.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/remotestore.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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
 
--- a/hgext/largefiles/reposetup.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/largefiles/reposetup.py	Tue Sep 04 13:49:10 2012 -0700
@@ -156,7 +156,7 @@
                 # Create a function that we can use to override what is
                 # normally the ignore matcher.  We've already checked
                 # for ignored files on the first dirstate walk, and
-                # unecessarily re-checking here causes a huge performance
+                # unnecessarily re-checking here causes a huge performance
                 # hit because lfdirstate only knows about largefiles
                 def _ignoreoverride(self):
                     return False
@@ -192,7 +192,7 @@
                         (unsure, modified, added, removed, missing, unknown,
                                 ignored, clean) = s
                         # Replace the list of ignored and unknown files with
-                        # the previously caclulated lists, and strip out the
+                        # the previously calculated lists, and strip out the
                         # largefiles
                         lfiles = set(lfdirstate._map)
                         ignored = set(result[5]).difference(lfiles)
--- a/hgext/mq.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/mq.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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/changelog
             # caching against the next repo.status call
             mm, aa, dd = repo.status(patchparent, top)[:3]
             changes = repo.changelog.read(top)
@@ -1535,7 +1535,7 @@
                 # if amending a patch, we start with existing
                 # files plus specified files - unfiltered
                 match = scmutil.matchfiles(repo, mm + aa + dd + matchfn.files())
-                # filter with inc/exl options
+                # filter with include/exclude options
                 matchfn = scmutil.match(repo[None], opts=opts)
             else:
                 match = scmutil.matchall(repo)
@@ -3185,9 +3185,9 @@
     revs = scmutil.revrange(repo, revrange)
     if repo['.'].rev() in revs and repo[None].files():
         ui.warn(_('warning: uncommitted changes in the working directory\n'))
-    # queue.finish may changes phases but leave the responsability to lock the
+    # queue.finish may changes phases but leave the responsibility to lock the
     # repo to the caller to avoid deadlock with wlock. This command code is
-    # responsability for this locking.
+    # responsibility for this locking.
     lock = repo.lock()
     try:
         q.finish(repo, revs)
--- a/hgext/record.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/record.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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)
 
@@ -81,7 +81,7 @@
 class header(object):
     """patch header
 
-    XXX shoudn't we move this to mercurial/patch.py ?
+    XXX shouldn't we move this to mercurial/patch.py ?
     """
     diffgit_re = re.compile('diff --git a/(.*) b/(.*)$')
     diff_re = re.compile('diff -r .* (.*)$')
--- a/hgext/schemes.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/schemes.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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:
--- a/hgext/win32mbcs.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/win32mbcs.py	Tue Sep 04 13:49:10 2012 -0700
@@ -119,7 +119,7 @@
     def f(*args, **kwds):
         return wrapper(func, args, kwds)
     try:
-        f.__name__ = func.__name__                # fail with python23
+        f.__name__ = func.__name__ # fails with Python 2.3
     except Exception:
         pass
     setattr(module, name, f)
--- a/hgext/zeroconf/Zeroconf.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/hgext/zeroconf/Zeroconf.py	Tue Sep 04 13:49:10 2012 -0700
@@ -66,7 +66,7 @@
 				 using select() for socket reads
 				 tested on Debian unstable with Python 2.2.2"""
 
-"""0.05 update - ensure case insensitivty on domain names
+"""0.05 update - ensure case insensitivity on domain names
                  support for unicast DNS queries"""
 
 """0.04 update - added some unit tests
@@ -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
@@ -335,7 +335,7 @@
 		raise AbstractMethodException
 
 	def toString(self, other):
-		"""String representation with addtional information"""
+		"""String representation with additional information"""
 		arg = "%s/%s,%s" % (self.ttl, self.getRemainingTTL(currentTimeMillis()), other)
 		return DNSEntry.toString(self, "record", arg)
 
@@ -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)
 
@@ -904,7 +904,7 @@
 	to cache information as it arrives.
 
 	It requires registration with an Engine object in order to have
-	the read() method called when a socket is availble for reading."""
+	the read() method called when a socket is available for reading."""
 
 	def __init__(self, zeroconf):
 		self.zeroconf = zeroconf
@@ -1140,7 +1140,7 @@
 		return self.port
 
 	def getPriority(self):
-		"""Pirority accessor"""
+		"""Priority accessor"""
 		return self.priority
 
 	def getWeight(self):
@@ -1259,7 +1259,7 @@
 			# SO_REUSEADDR should be equivalent to SO_REUSEPORT for
 			# multicast UDP sockets (p 731, "TCP/IP Illustrated,
 			# Volume 2"), but some BSD-derived systems require
-			# SO_REUSEPORT to be specified explicity.  Also, not all
+			# SO_REUSEPORT to be specified explicitly.  Also, not all
 			# versions of Python have SO_REUSEPORT available.  So
 			# if you're on a BSD-based system, and haven't upgraded
 			# to Python 2.3 yet, you may find this library doesn't
@@ -1272,10 +1272,8 @@
 			self.socket.bind(self.group)
 		except Exception:
 			# Some versions of linux raise an exception even though
-			# the SO_REUSE* options have been set, so ignore it
-			#
+			# SO_REUSEADDR and SO_REUSEPORT have been set, so ignore it
 			pass
-		#self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(self.intf) + socket.inet_aton('0.0.0.0'))
 		self.socket.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0'))
 
 		self.listeners = []
@@ -1433,7 +1431,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
--- a/mercurial/archival.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/archival.py	Tue Sep 04 13:49:10 2012 -0700
@@ -13,6 +13,10 @@
 import cStringIO, os, tarfile, time, zipfile
 import zlib, gzip
 
+# from unzip source code:
+_UNX_IFREG = 0x8000
+_UNX_IFLNK = 0xa000
+
 def tidyprefix(dest, kind, prefix):
     '''choose prefix to use for names in archive.  make sure prefix is
     safe for consumers.'''
@@ -173,10 +177,10 @@
         # unzip will not honor unix file modes unless file creator is
         # set to unix (id 3).
         i.create_system = 3
-        ftype = 0x8000 # UNX_IFREG in unzip source code
+        ftype = _UNX_IFREG
         if islink:
             mode = 0777
-            ftype = 0xa000 # UNX_IFLNK in unzip source code
+            ftype = _UNX_IFLNK
         i.external_attr = (mode | ftype) << 16L
         self.z.writestr(i, data)
 
--- a/mercurial/bookmarks.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/bookmarks.py	Tue Sep 04 13:49:10 2012 -0700
@@ -58,7 +58,7 @@
             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
--- a/mercurial/byterange.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/byterange.py	Tue Sep 04 13:49:10 2012 -0700
@@ -32,7 +32,7 @@
 
     This was extremely simple. The Range header is a HTTP feature to
     begin with so all this class does is tell urllib2 that the
-    "206 Partial Content" reponse from the HTTP server is what we
+    "206 Partial Content" response from the HTTP server is what we
     expected.
 
     Example:
@@ -64,7 +64,7 @@
 
 class RangeableFileObject(object):
     """File object wrapper to enable raw range handling.
-    This was implemented primarilary for handling range
+    This was implemented primarily for handling range
     specifications for file:// urls. This object effectively makes
     a file object look like it consists only of a range of bytes in
     the stream.
@@ -431,7 +431,7 @@
     Return a tuple whose first element is guaranteed to be an int
     and whose second element will be '' (meaning: the last byte) or
     an int. Finally, return None if the normalized tuple == (0,'')
-    as that is equivelant to retrieving the entire file.
+    as that is equivalent to retrieving the entire file.
     """
     if range_tup is None:
         return None
--- a/mercurial/changelog.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/changelog.py	Tue Sep 04 13:49:10 2012 -0700
@@ -183,7 +183,7 @@
         nodeid\n        : manifest node in ascii
         user\n          : user, no \n or \r allowed
         time tz extra\n : date (time is int or float, timezone is int)
-                        : extra is metadatas, encoded and separated by '\0'
+                        : extra is metadata, encoded and separated by '\0'
                         : older versions ignore it
         files\n\n       : files modified by the cset, no \n or \r allowed
         (.*)            : comment (free text, ideally utf-8)
--- a/mercurial/cmdutil.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/cmdutil.py	Tue Sep 04 13:49:10 2012 -0700
@@ -1258,7 +1258,7 @@
     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
     opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
     # pats/include/exclude are passed to match.match() directly in
-    # _matchfile() revset but walkchangerevs() builds its matcher with
+    # _matchfiles() revset but walkchangerevs() builds its matcher with
     # scmutil.match(). The difference is input pats are globbed on
     # platforms without shell expansion (windows).
     pctx = repo[None]
@@ -1304,7 +1304,7 @@
             fnopats = (('_ancestors', '_fancestors'),
                        ('_descendants', '_fdescendants'))
             if pats:
-                # follow() revset inteprets its file argument as a
+                # follow() revset interprets its file argument as a
                 # manifest entry, so use match.files(), not pats.
                 opts[fpats[followfirst]] = list(match.files())
             else:
--- a/mercurial/commands.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/commands.py	Tue Sep 04 13:49:10 2012 -0700
@@ -543,7 +543,7 @@
           hg bisect --good
           hg bisect --bad
 
-      - mark the current revision, or a known revision, to be skipped (eg. if
+      - mark the current revision, or a known revision, to be skipped (e.g. if
         that revision is not usable because of another issue)::
 
           hg bisect --skip
@@ -1252,7 +1252,7 @@
     Returns 0 on success, 1 if nothing changed.
     """
     if opts.get('subrepos'):
-        # Let --subrepos on the command line overide config setting.
+        # Let --subrepos on the command line override config setting.
         ui.setconfig('ui', 'commitsubrepos', True)
 
     extra = {}
@@ -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:
--- a/mercurial/commandserver.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/commandserver.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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')
--- a/mercurial/config.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/config.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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.
         """
--- a/mercurial/context.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/context.py	Tue Sep 04 13:49:10 2012 -0700
@@ -237,8 +237,8 @@
 
     def extinct(self):
         """True if the changeset is extinct"""
-        # We should just compute a cache a check againts it.
-        # see revset implementation for details
+        # We should just compute a cache and check against it.
+        # See revset implementation for details.
         #
         # But this naive implementation does not require cache
         if self.phase() <= phases.public:
@@ -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)
 
--- a/mercurial/discovery.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/discovery.py	Tue Sep 04 13:49:10 2012 -0700
@@ -21,7 +21,7 @@
       any longer.
     "heads" is either the supplied heads, or else the remote's heads.
 
-    If you pass heads and they are all known locally, the reponse lists justs
+    If you pass heads and they are all known locally, the response lists just
     these heads in "common" and in "heads".
 
     Please use findcommonoutgoing to compute the set of outgoing nodes to give
@@ -348,7 +348,7 @@
 def visiblebranchmap(repo):
     """return a branchmap for the visible set"""
     # XXX Recomputing this data on the fly is very slow.  We should build a
-    # XXX cached version while computin the standard branchmap version.
+    # XXX cached version while computing the standard branchmap version.
     sroots = repo._phasecache.phaseroots[phases.secret]
     if sroots or repo.obsstore:
         vbranchmap = {}
--- a/mercurial/encoding.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/encoding.py	Tue Sep 04 13:49:10 2012 -0700
@@ -223,7 +223,7 @@
 
     Principles of operation:
 
-    - ASCII and UTF-8 data sucessfully round-trips and is understood
+    - ASCII and UTF-8 data successfully round-trips and is understood
       by Unicode-oriented clients
     - filenames and file contents in arbitrary other encodings can have
       be round-tripped or recovered by clueful clients
--- a/mercurial/hbisect.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/hbisect.py	Tue Sep 04 13:49:10 2012 -0700
@@ -159,7 +159,7 @@
     Return a list of revision(s) that match the given status:
 
     - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip
-    - ``goods``, ``bads``      : csets topologicaly good/bad
+    - ``goods``, ``bads``      : csets topologically good/bad
     - ``range``              : csets taking part in the bisection
     - ``pruned``             : csets that are goods, bads or skipped
     - ``untested``           : csets whose fate is yet unknown
@@ -170,8 +170,8 @@
     if status in ('good', 'bad', 'skip', 'current'):
         return map(repo.changelog.rev, state[status])
     else:
-        # In the floowing sets, we do *not* call 'bisect()' with more
-        # than one level of recusrsion, because that can be very, very
+        # In the following sets, we do *not* call 'bisect()' with more
+        # than one level of recursion, because that can be very, very
         # time consuming. Instead, we always develop the expression as
         # much as possible.
 
@@ -200,7 +200,7 @@
 
         # 'ignored' is all csets that were not used during the bisection
         # due to DAG topology, but may however have had an impact.
-        # Eg., a branch merged between bads and goods, but whose branch-
+        # E.g., a branch merged between bads and goods, but whose branch-
         # point is out-side of the range.
         iba = '::bisect(bad) - ::bisect(good)'  # Ignored bads' ancestors
         iga = '::bisect(good) - ::bisect(bad)'  # Ignored goods' ancestors
--- a/mercurial/help/config.txt	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/help/config.txt	Tue Sep 04 13:49:10 2012 -0700
@@ -1431,7 +1431,7 @@
     Example: ``http://hgserver/static/``.
 
 ``stripes``
-    How many lines a "zebra stripe" should span in multiline output.
+    How many lines a "zebra stripe" should span in multi-line output.
     Default is 1; set to 0 to disable.
 
 ``style``
--- a/mercurial/help/hgweb.txt	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/help/hgweb.txt	Tue Sep 04 13:49:10 2012 -0700
@@ -11,7 +11,7 @@
   - paths
   - collections
 
-The ``web`` options are thorougly described in :hg:`help config`.
+The ``web`` options are thoroughly described in :hg:`help config`.
 
 The ``paths`` section maps URL paths to paths of repositories in the
 filesystem. hgweb will not expose the filesystem directly - only
--- a/mercurial/hgweb/server.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/hgweb/server.py	Tue Sep 04 13:49:10 2012 -0700
@@ -12,7 +12,7 @@
 from mercurial.i18n import _
 
 def _splitURI(uri):
-    """ Return path and query splited from uri
+    """Return path and query that has been split from uri
 
     Just like CGI environment, the path is unquoted, the query is
     not.
--- a/mercurial/hgweb/wsgicgi.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/hgweb/wsgicgi.py	Tue Sep 04 13:49:10 2012 -0700
@@ -19,7 +19,7 @@
     environ = dict(os.environ.iteritems())
     environ.setdefault('PATH_INFO', '')
     if environ.get('SERVER_SOFTWARE', '').startswith('Microsoft-IIS'):
-        # IIS includes script_name in path_info
+        # IIS includes script_name in PATH_INFO
         scriptname = environ['SCRIPT_NAME']
         if environ['PATH_INFO'].startswith(scriptname):
             environ['PATH_INFO'] = environ['PATH_INFO'][len(scriptname):]
--- a/mercurial/hook.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/hook.py	Tue Sep 04 13:49:10 2012 -0700
@@ -154,7 +154,7 @@
                 oldstdout = os.dup(stdoutno)
                 os.dup2(stderrno, stdoutno)
         except AttributeError:
-            # __stdout/err__ doesn't have fileno(), it's not a real file
+            # __stdout__/__stderr__ doesn't have fileno(), it's not a real file
             pass
 
     try:
--- a/mercurial/httpclient/__init__.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/httpclient/__init__.py	Tue Sep 04 13:49:10 2012 -0700
@@ -170,7 +170,7 @@
         except socket.sslerror, e:
             if e.args[0] != socket.SSL_ERROR_WANT_READ:
                 raise
-            logger.debug('SSL_WANT_READ in _select, should retry later')
+            logger.debug('SSL_ERROR_WANT_READ in _select, should retry later')
             return True
         logger.debug('response read %d data during _select', len(data))
         # If the socket was readable and no data was read, that means
@@ -293,7 +293,7 @@
           host: The host to which we'll connect.
           port: Optional. The port over which we'll connect. Default 80 for
                 non-ssl, 443 for ssl.
-          use_ssl: Optional. Wether to use ssl. Defaults to False if port is
+          use_ssl: Optional. Whether to use ssl. Defaults to False if port is
                    not 443, true if port is 443.
           ssl_validator: a function(socket) to validate the ssl cert
           timeout: Optional. Connection timeout, default is TIMEOUT_DEFAULT.
@@ -374,7 +374,7 @@
         if self.ssl:
             # This is the default, but in the case of proxied SSL
             # requests the proxy logic above will have cleared
-            # blocking mode, so reenable it just to be safe.
+            # blocking mode, so re-enable it just to be safe.
             sock.setblocking(1)
             logger.debug('wrapping socket for ssl with options %r',
                          self.ssl_opts)
@@ -414,7 +414,7 @@
         """Close the connection to the server.
 
         This is a no-op if the connection is already closed. The
-        connection may automatically close if requessted by the server
+        connection may automatically close if requested by the server
         or required by the nature of a response.
         """
         if self.sock is None:
@@ -532,7 +532,7 @@
                         if e.args[0] != socket.SSL_ERROR_WANT_READ:
                             raise
                         logger.debug(
-                            'SSL_WANT_READ while sending data, retrying...')
+                            'SSL_ERROR_WANT_READ while sending data, retrying...')
                         continue
                     if not data:
                         logger.info('socket appears closed in read')
--- a/mercurial/httpclient/_readers.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/httpclient/_readers.py	Tue Sep 04 13:49:10 2012 -0700
@@ -120,7 +120,7 @@
         if data:
             assert not self._finished, (
                 'tried to add data (%r) to a closed reader!' % data)
-        logger.debug('%s read an addtional %d data', self.name, len(data))
+        logger.debug('%s read an additional %d data', self.name, len(data))
         self._done_chunks.append(data)
 
 
@@ -162,7 +162,7 @@
 
     def _load(self, data):
         assert not self._finished, 'tried to add data to a closed reader!'
-        logger.debug('chunked read an addtional %d data', len(data))
+        logger.debug('chunked read an additional %d data', len(data))
         position = 0
         if self._leftover_data:
             logger.debug('chunked reader trying to finish block from leftover data')
@@ -188,7 +188,7 @@
                 return
             if amt == 0:
                 self._finished = True
-                logger.debug('closing chunked redaer due to chunk of length 0')
+                logger.debug('closing chunked reader due to chunk of length 0')
                 return
             self._done_chunks.append(data[block_start:block_start + amt])
             position = block_start + amt + len(self._eol)
--- a/mercurial/httpconnection.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/httpconnection.py	Tue Sep 04 13:49:10 2012 -0700
@@ -73,7 +73,7 @@
     if '://' in uri:
         scheme, hostpath = uri.split('://', 1)
     else:
-        # py2.4.1 doesn't provide the full URI
+        # Python 2.4.1 doesn't provide the full URI
         scheme, hostpath = 'http', uri
     bestuser = None
     bestlen = 0
--- a/mercurial/keepalive.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/keepalive.py	Tue Sep 04 13:49:10 2012 -0700
@@ -67,8 +67,8 @@
 
     close_connection()  -  close the connection to the host
     readlines()         -  you know, readlines()
-    status              -  the return status (ie 404)
-    reason              -  english translation of status (ie 'File not found')
+    status              -  the return status (i.e. 404)
+    reason              -  english translation of status (i.e. 'File not found')
 
   If you want the best of both worlds, use this inside an
   AttributeError-catching try:
@@ -297,7 +297,7 @@
             # first.  We previously got into a nasty loop
             # where an exception was uncaught, and so the
             # connection stayed open.  On the next try, the
-            # same exception was raised, etc.  The tradeoff is
+            # same exception was raised, etc.  The trade-off is
             # that it's now possible this call will raise
             # a DIFFERENT exception
             if DEBUG:
@@ -370,7 +370,7 @@
     # so if you THEN do a normal read, you must first take stuff from
     # the buffer.
 
-    # the read method wraps the original to accomodate buffering,
+    # the read method wraps the original to accommodate buffering,
     # although read() never adds to the buffer.
     # Both readline and readlines have been stolen with almost no
     # modification from socket.py
@@ -442,7 +442,7 @@
                 try:
                     chunk_left = int(line, 16)
                 except ValueError:
-                    # close the connection as protocol synchronisation is
+                    # close the connection as protocol synchronization is
                     # probably lost
                     self.close()
                     raise httplib.IncompleteRead(value)
@@ -548,7 +548,7 @@
         read = getattr(str, 'read', None)
         if read is not None:
             if self.debuglevel > 0:
-                print "sendIng a read()able"
+                print "sending a read()able"
             data = read(blocksize)
             while data:
                 self.sock.sendall(data)
@@ -737,7 +737,7 @@
 
 
 def test(url, N=10):
-    print "checking error hander (do this on a non-200)"
+    print "checking error handler (do this on a non-200)"
     try: error_handler(url)
     except IOError:
         print "exiting - exception will prevent further tests"
--- a/mercurial/localrepo.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/localrepo.py	Tue Sep 04 13:49:10 2012 -0700
@@ -300,12 +300,14 @@
         """hiddenrevs: revs that should be hidden by command and tools
 
         This set is carried on the repo to ease initialisation and lazy
-        loading it'll probably move back to changelog for efficienty and
+        loading; it'll probably move back to changelog for efficiency and
         consistency reason
 
         Note that the hiddenrevs will needs invalidations when
         - a new changesets is added (possible unstable above extinct)
         - a new obsolete marker is added (possible new extinct changeset)
+
+        hidden changesets cannot have non-hidden descendants
         """
         hidden = set()
         if self.obsstore:
@@ -712,7 +714,7 @@
             # Remove candidate heads that no longer are in the repo (e.g., as
             # the result of a strip that just happened).  Avoid using 'node in
             # self' here because that dives down into branchcache code somewhat
-            # recrusively.
+            # recursively.
             bheadrevs = [self.changelog.rev(node) for node in bheads
                          if self.changelog.hasnode(node)]
             newheadrevs = [self.changelog.rev(node) for node in newnodes
@@ -732,7 +734,7 @@
                 iterrevs = list(bheadrevs)
 
             # This loop prunes out two kinds of heads - heads that are
-            # superceded by a head in newheadrevs, and newheadrevs that are not
+            # superseded by a head in newheadrevs, and newheadrevs that are not
             # heads because an existing head is their descendant.
             while iterrevs:
                 latest = iterrevs.pop()
@@ -1479,7 +1481,7 @@
         and you also know the set of candidate new heads that may have resulted
         from the destruction, you can set newheadnodes.  This will enable the
         code to update the branchheads cache, rather than having future code
-        decide it's invalid and regenrating it from scratch.
+        decide it's invalid and regenerating it from scratch.
         '''
         # If we have info, newheadnodes, on how to update the branch cache, do
         # it, Otherwise, since nodes were destroyed, the cache is stale and this
@@ -1906,7 +1908,7 @@
                         ret = remote.addchangegroup(cg, 'push', self.url())
 
                 if ret:
-                    # push succeed, synchonize target of the push
+                    # push succeed, synchronize target of the push
                     cheads = outgoing.missingheads
                 elif revs is None:
                     # All out push fails. synchronize all common
@@ -1925,7 +1927,7 @@
                     #     missing = ((commonheads::missingheads) - commonheads)
                     #
                     # We can pick:
-                    # * missingheads part of comon (::commonheads)
+                    # * missingheads part of common (::commonheads)
                     common = set(outgoing.common)
                     cheads = [node for node in revs if node in common]
                     # and
@@ -2539,7 +2541,7 @@
         # uncompressed only if compatible.
 
         if not stream:
-            # if the server explicitely prefer to stream (for fast LANs)
+            # if the server explicitly prefers to stream (for fast LANs)
             stream = remote.capable('stream-preferred')
 
         if stream and not heads:
--- a/mercurial/lock.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/lock.py	Tue Sep 04 13:49:10 2012 -0700
@@ -122,8 +122,8 @@
     def release(self):
         """release the lock and execute callback function if any
 
-        If the lock have been aquired multiple time, the actual release is
-        delayed to the last relase call."""
+        If the lock has been acquired multiple time, the actual release is
+        delayed to the last release call."""
         if self.held > 1:
             self.held -= 1
         elif self.held == 1:
--- a/mercurial/mail.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/mail.py	Tue Sep 04 13:49:10 2012 -0700
@@ -13,7 +13,7 @@
 _oldheaderinit = email.Header.Header.__init__
 def _unifiedheaderinit(self, *args, **kw):
     """
-    Python2.7 introduces a backwards incompatible change
+    Python 2.7 introduces a backwards incompatible change
     (Python issue1974, r70772) in email.Generator.Generator code:
     pre-2.7 code passed "continuation_ws='\t'" to the Header
     constructor, and 2.7 removed this parameter.
@@ -151,7 +151,7 @@
 
 def mimetextqp(body, subtype, charset):
     '''Return MIME message.
-    Qouted-printable transfer encoding will be used if necessary.
+    Quoted-printable transfer encoding will be used if necessary.
     '''
     enc = None
     for line in body.splitlines():
--- a/mercurial/manifest.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/manifest.py	Tue Sep 04 13:49:10 2012 -0700
@@ -64,9 +64,7 @@
 
         If the string is found m[start:end] are the line containing
         that string.  If start == end the string was not found and
-        they indicate the proper sorted insertion point.  This was
-        taken from bisect_left, and modified to find line start/end as
-        it goes along.
+        they indicate the proper sorted insertion point.
 
         m should be a buffer or a string
         s is a string'''
@@ -156,7 +154,7 @@
             # combine the changed lists into one list for sorting
             work = [(x, False) for x in added]
             work.extend((x, True) for x in removed)
-            # this could use heapq.merge() (from python2.6+) or equivalent
+            # this could use heapq.merge() (from Python 2.6+) or equivalent
             # since the lists are already sorted
             work.sort()
 
--- a/mercurial/match.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/match.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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
--- a/mercurial/minirst.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/minirst.py	Tue Sep 04 13:49:10 2012 -0700
@@ -133,7 +133,7 @@
     def match(lines, i, itemre, singleline):
         """Does itemre match an item at line i?
 
-        A list item can be followed by an idented line or another list
+        A list item can be followed by an indented line or another list
         item (but only if singleline is True).
         """
         line1 = lines[i]
--- a/mercurial/obsolete.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/obsolete.py	Tue Sep 04 13:49:10 2012 -0700
@@ -55,14 +55,12 @@
 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
 
-# the obsolete feature is not mature enought to be enabled by default.
+_SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
+
+# the obsolete feature is not mature enough to be enabled by default.
 # you have to rely on third party extension extension to enable this.
 _enabled = False
 
@@ -211,7 +209,7 @@
                 # defined. So we must seek to the end before calling tell(),
                 # or we may get a zero offset for non-zero sized files on
                 # some platforms (issue3543).
-                f.seek(0, 2) # os.SEEK_END
+                f.seek(0, _SEEK_END)
                 offset = f.tell()
                 transaction.add('obsstore', offset)
                 # offset == 0: new file - add the version header
@@ -318,7 +316,7 @@
 def anysuccessors(obsstore, node):
     """Yield every successor of <node>
 
-    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:
--- a/mercurial/phases.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/phases.py	Tue Sep 04 13:49:10 2012 -0700
@@ -195,7 +195,7 @@
         return self._phaserevs
 
     def phase(self, repo, rev):
-        # We need a repo argument here to be able to build _phaserev
+        # We need a repo argument here to be able to build _phaserevs
         # if necessary. The repository instance is not stored in
         # phasecache to avoid reference cycles. The changelog instance
         # is not stored because it is a filecache() property and can
@@ -363,7 +363,7 @@
     """compute new head of a subset minus another
 
     * `heads`: define the first subset
-    * `rroots`: 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]
--- a/mercurial/pure/osutil.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/pure/osutil.py	Tue Sep 04 13:49:10 2012 -0700
@@ -82,7 +82,7 @@
 
     _FILE_ATTRIBUTE_NORMAL = 0x80
 
-    # _open_osfhandle
+    # open_osfhandle flags
     _O_RDONLY = 0x0000
     _O_RDWR = 0x0002
     _O_APPEND = 0x0008
--- a/mercurial/pure/parsers.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/pure/parsers.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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
--- a/mercurial/pvec.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/pvec.py	Tue Sep 04 13:49:10 2012 -0700
@@ -57,7 +57,7 @@
 _depthbytes = _depthbits / 8
 _vecbytes = _bytes - _depthbytes
 _vecbits = _vecbytes * 8
-_radius = (_vecbits - 30) / 2 # high probability vecs are related
+_radius = (_vecbits - 30) / 2 # high probability vectors are related
 
 def _bin(bs):
     '''convert a bytestring to a long'''
--- a/mercurial/py3kcompat.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/py3kcompat.py	Tue Sep 04 13:49:10 2012 -0700
@@ -12,7 +12,7 @@
 def bytesformatter(format, args):
     '''Custom implementation of a formatter for bytestrings.
 
-    This function currently relias on the string formatter to do the
+    This function currently relies on the string formatter to do the
     formatting and always returns bytes objects.
 
     >>> bytesformatter(20, 10)
--- a/mercurial/repair.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/repair.py	Tue Sep 04 13:49:10 2012 -0700
@@ -111,9 +111,8 @@
         saverevs.difference_update(descendants)
     savebases = [cl.node(r) for r in saverevs]
     stripbases = [cl.node(r) for r in tostrip]
-    rset = ' or '.join([str(r) for r in tostrip])
-    newbmtarget = repo.revs('sort(heads(ancestors(%r) - (%r)), -rev)',
-                            rset, rset)
+    newbmtarget = repo.revs('sort(heads((::%ld) - (%ld)), -rev)',
+                            tostrip, tostrip)
     if newbmtarget:
         newbmtarget = newbmtarget[0]
     else:
--- a/mercurial/revlog.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/revlog.py	Tue Sep 04 13:49:10 2012 -0700
@@ -547,7 +547,7 @@
         # Our topologically sorted list of output nodes.
         orderedout = []
         # Don't start at nullid since we don't want nullid in our output list,
-        # and if nullid shows up in descedents, empty parents will look like
+        # and if nullid shows up in descendants, empty parents will look like
         # they're descendants.
         for r in xrange(max(lowestrev, 0), highestrev + 1):
             n = self.node(r)
@@ -1015,7 +1015,7 @@
         see addrevision for argument descriptions.
         invariants:
         - text is optional (can be None); if not set, cachedelta must be set.
-          if both are set, they must correspond to eachother.
+          if both are set, they must correspond to each other.
         """
         btext = [text]
         def buildtext():
--- a/mercurial/revset.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/revset.py	Tue Sep 04 13:49:10 2012 -0700
@@ -335,7 +335,7 @@
     Changesets marked in the specified bisect status:
 
     - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip
-    - ``goods``, ``bads``      : csets topologicaly good/bad
+    - ``goods``, ``bads``      : csets topologically good/bad
     - ``range``              : csets taking part in the bisection
     - ``pruned``             : csets that are goods, bads or skipped
     - ``untested``           : csets whose fate is yet unknown
@@ -594,7 +594,7 @@
 
             # The visited lineage is a match if the current source is in the arg
             # set.  Since every candidate dest is visited by way of iterating
-            # subset, any dests futher back in the lineage will be tested by a
+            # subset, any dests further back in the lineage will be tested by a
             # different iteration over subset.  Likewise, if the src was already
             # selected, the current lineage can be selected without going back
             # further.
--- a/mercurial/setdiscovery.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/setdiscovery.py	Tue Sep 04 13:49:10 2012 -0700
@@ -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
@@ -109,7 +106,8 @@
         srvheadhashes = srvheadhashesref.value
         yesno = yesnoref.value
     else:
-        # compatibitity with pre-batch, but post-known remotes during 1.9 devel
+        # compatibility with pre-batch, but post-known remotes during 1.9
+        # development
         srvheadhashes = remote.heads()
         sample = []
 
--- a/mercurial/subrepo.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/subrepo.py	Tue Sep 04 13:49:10 2012 -0700
@@ -888,7 +888,7 @@
     def _gitnodir(self, commands, env=None, stream=False, cwd=None):
         """Calls the git command
 
-        The methods tries to call the git command. versions previor to 1.6.0
+        The methods tries to call the git command. versions prior to 1.6.0
         are not supported and very probably fail.
         """
         self._ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands)))
--- a/mercurial/tags.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/tags.py	Tue Sep 04 13:49:10 2012 -0700
@@ -124,8 +124,8 @@
             continue
 
         # we prefer alltags[name] if:
-        #  it supercedes us OR
-        #  mutual supercedes and it has a higher rank
+        #  it supersedes us OR
+        #  mutual supersedes and it has a higher rank
         # otherwise we win because we're tip-most
         anode, ahist = nodehist
         bnode, bhist = alltags[name]
--- a/mercurial/templates/gitweb/graph.tmpl	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/templates/gitweb/graph.tmpl	Tue Sep 04 13:49:10 2012 -0700
@@ -51,11 +51,6 @@
 var graph = new Graph();
 graph.scale({bg_height});
 
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>';
-revlink += '</span> _TAGS';
-revlink += '<span class="info">_DATE, by _USER</span></li>';
-
 graph.vertex = function(x, y, color, parity, cur) \{
 	
 	this.ctx.beginPath();
@@ -66,13 +61,6 @@
 	var bg = '<li class="bg parity' + parity + '"></li>';
 	var left = (this.columns + 1) * this.bg_height;
 	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
 	
 	var tagspan = '';
 	if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
@@ -99,7 +87,11 @@
 		tagspan += '</span>';
 	}
 	
-	item = item.replace(/_TAGS/, tagspan);
+	var item = '<li style="' + nstyle + '"><span class="desc">';
+	item += '<a class="list" href="{url}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '"><b>' + cur[3] + '</b></a>';
+	item += '</span> ' + tagspan + '';
+	item += '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
+
 	return [bg, item];
 	
 }
--- a/mercurial/templates/monoblue/graph.tmpl	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/templates/monoblue/graph.tmpl	Tue Sep 04 13:49:10 2012 -0700
@@ -49,10 +49,6 @@
     var graph = new Graph();
     graph.scale({bg_height});
 
-    var revlink = '<li style="_STYLE"><span class="desc">';
-    revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-    revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
-
     graph.vertex = function(x, y, color, parity, cur) \{
 
         this.ctx.beginPath();
@@ -63,13 +59,6 @@
         var bg = '<li class="bg parity' + parity + '"></li>';
         var left = (this.columns + 1) * this.bg_height;
         var nstyle = 'padding-left: ' + left + 'px;';
-        var item = revlink.replace(/_STYLE/, nstyle);
-        item = item.replace(/_PARITY/, 'parity' + parity);
-        item = item.replace(/_NODEID/, cur[0]);
-        item = item.replace(/_NODEID/, cur[0]);
-        item = item.replace(/_DESC/, cur[3]);
-        item = item.replace(/_USER/, cur[4]);
-        item = item.replace(/_DATE/, cur[5]);
 
         var tagspan = '';
         if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
@@ -96,7 +85,10 @@
             tagspan += '</span>';
         }
 
-        item = item.replace(/_TAGS/, tagspan);
+        var item = '<li style="' + nstyle + '"><span class="desc">';
+        item += '<a href="{url}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
+        item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
+
         return [bg, item];
 
     }
--- a/mercurial/templates/paper/graph.tmpl	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/templates/paper/graph.tmpl	Tue Sep 04 13:49:10 2012 -0700
@@ -62,10 +62,6 @@
 var graph = new Graph();
 graph.scale({bg_height});
 
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
-
 graph.vertex = function(x, y, color, parity, cur) \{
 	
 	this.ctx.beginPath();
@@ -76,13 +72,6 @@
 	var bg = '<li class="bg parity' + parity + '"></li>';
 	var left = (this.columns + 1) * this.bg_height;
 	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
 
 	var tagspan = '';
 	if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
@@ -108,8 +97,11 @@
 		}
 		tagspan += '</span>';
 	}
+
+	var item = '<li style="' + nstyle + '"><span class="desc">';
+	item += '<a href="{url}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
+	item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
 	
-	item = item.replace(/_TAGS/, tagspan);
 	return [bg, item];
 	
 }
--- a/mercurial/templates/spartan/graph.tmpl	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/templates/spartan/graph.tmpl	Tue Sep 04 13:49:10 2012 -0700
@@ -43,10 +43,6 @@
 var graph = new Graph();
 graph.scale({bg_height});
 
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-revlink += '</span><span class="info">_DATE, by _USER</span></li>';
-
 graph.vertex = function(x, y, color, parity, cur) \{
 	
 	this.ctx.beginPath();
@@ -57,14 +53,10 @@
 	var bg = '<li class="bg parity' + parity + '"></li>';
 	var left = (this.columns + 1) * this.bg_height;
 	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
-	
+	var item = '<li style="' + nstyle + '"><span class="desc">';
+	item += '<a href="{url}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '">' + cur[3] + '</a>';
+	item += '</span><span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
+
 	return [bg, item];
 	
 }
--- a/mercurial/templates/template-vars.txt	Tue Aug 21 16:06:34 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-repo          the name of the repo
-rev           a changeset.manifest revision
-node          a changeset node
-changesets    total number of changesets
-file          a filename
-filerev       a file revision
-filerevs      total number of file revisions
-up            the directory of the relevant file
-path          a path in the manifest, starting with "/"
-basename      a short pathname
-date          a date string
-age           age in hours, days, etc
-line          a line of text (escaped)
-desc          a description (escaped, with breaks)
-shortdesc     a short description (escaped)
-author        a name or email addressv(obfuscated)
-parent        a list of the parent
-child         a list of the children
-tags          a list of tag
-
-header        the global page header
-footer        the global page footer
-
-files         a list of file links
-file_copies   a list of pairs of name, source filenames
-dirs          a set of directory links
-diff          a diff of one or more files
-annotate      an annotated file
-entries       the entries relevant to the page
-
-url           base url of hgweb interface
-logourl       base url of logo
-staticurl     base url for static resources
-
-
-Templates and commands:
-  changelog(rev) - a page for browsing changesets
-    naventry - a link for jumping to a changeset number
-    filenodelink - jump to file diff
-    fileellipses - printed after maxfiles
-    changelogentry - an entry in the log
-  manifest - browse a manifest as a directory tree
--- a/mercurial/transaction.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/transaction.py	Tue Sep 04 13:49:10 2012 -0700
@@ -1,4 +1,4 @@
-# transaction.py - simple journalling scheme for mercurial
+# transaction.py - simple journaling scheme for mercurial
 #
 # This transaction scheme is intended to gracefully handle program
 # errors and interruptions. More serious failures like system crashes
--- a/mercurial/ui.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/ui.py	Tue Sep 04 13:49:10 2012 -0700
@@ -713,8 +713,8 @@
         With stock hg, this is simply a debug message that is hidden
         by default, but with extensions or GUI tools it may be
         visible. 'topic' is the current operation, 'item' is a
-        non-numeric marker of the current position (ie the currently
-        in-process file), 'pos' is the current numeric position (ie
+        non-numeric marker of the current position (i.e. the currently
+        in-process file), 'pos' is the current numeric position (i.e.
         revision, bytes, etc.), unit is a corresponding unit label,
         and total is the highest expected pos.
 
--- a/mercurial/url.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/url.py	Tue Sep 04 13:49:10 2012 -0700
@@ -175,7 +175,7 @@
             self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             self.sock.connect((self.host, self.port))
             if _generic_proxytunnel(self):
-                # we do not support client x509 certificates
+                # we do not support client X.509 certificates
                 self.sock = sslutil.ssl_wrap_socket(self.sock, None, None)
         else:
             keepalive.HTTPConnection.connect(self)
@@ -278,7 +278,8 @@
     res.will_close = res._check_close()
 
     # do we have a Content-Length?
-    # NOTE: RFC 2616, S4.4, #3 says we ignore this if tr_enc is "chunked"
+    # NOTE: RFC 2616, section 4.4, #3 says we ignore this if
+    # transfer-encoding is "chunked"
     length = res.msg.getheader('content-length')
     if length and not res.chunked:
         try:
--- a/mercurial/util.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/util.py	Tue Sep 04 13:49:10 2012 -0700
@@ -1,4 +1,4 @@
-# util.py - Mercurial utility functions and platform specfic implementations
+# util.py - Mercurial utility functions and platform specific implementations
 #
 #  Copyright 2005 K. Thananchayan <thananck@yahoo.com>
 #  Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
@@ -7,7 +7,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-"""Mercurial utility functions and platform specfic implementations.
+"""Mercurial utility functions and platform specific implementations.
 
 This contains helper routines that are independent of the SCM core and
 hide platform-specific details from the core.
@@ -799,7 +799,7 @@
     return temp
 
 class atomictempfile(object):
-    '''writeable file object that atomically updates a file
+    '''writable file object that atomically updates a file
 
     All writes will go to a temporary copy of the original file. Call
     close() when you are done writing, and atomictempfile will rename
@@ -1239,7 +1239,7 @@
         so overriding is needed to use width information of each characters.
 
         In addition, characters classified into 'ambiguous' width are
-        treated as wide in east asian area, but as narrow in other.
+        treated as wide in East Asian area, but as narrow in other.
 
         This requires use decision to determine width of such characters.
         """
@@ -1300,7 +1300,7 @@
                 width = self.width - len(indent)
 
                 # First chunk on line is whitespace -- drop it, unless this
-                # is the very beginning of the text (ie. no lines started yet).
+                # is the very beginning of the text (i.e. no lines started yet).
                 if self.drop_whitespace and chunks[-1].strip() == '' and lines:
                     del chunks[-1]
 
@@ -1477,7 +1477,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:
--- a/mercurial/win32.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/win32.py	Tue Sep 04 13:49:10 2012 -0700
@@ -328,7 +328,7 @@
     env += '\0'
 
     args = subprocess.list2cmdline(args)
-    # Not running the command in shell mode makes python26 hang when
+    # Not running the command in shell mode makes Python 2.6 hang when
     # writing to hgweb output socket.
     comspec = os.environ.get("COMSPEC", "cmd.exe")
     args = comspec + " /c " + args
--- a/mercurial/windows.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/windows.py	Tue Sep 04 13:49:10 2012 -0700
@@ -152,7 +152,7 @@
 #   backslash
 # (See http://msdn2.microsoft.com/en-us/library/a1y7w461.aspx )
 # So, to quote a string, we must surround it in double quotes, double
-# the number of backslashes that preceed double quotes and add another
+# the number of backslashes that precede double quotes and add another
 # backslash before every double quote (being careful with the double
 # quote we've appended to the end)
 _quotere = None
--- a/mercurial/wireproto.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/mercurial/wireproto.py	Tue Sep 04 13:49:10 2012 -0700
@@ -516,7 +516,7 @@
     it is serving. Client checks to see if it understands the format.
 
     The format is simple: the server writes out a line with the amount
-    of files, then the total amount of bytes to be transfered (separated
+    of files, then the total amount of bytes to be transferred (separated
     by a space). Then, for each file, the server first writes the filename
     and filesize (separated by the null character), then the file contents.
     '''
--- a/tests/test-check-code.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-check-code.t	Tue Sep 04 13:49:10 2012 -0700
@@ -83,7 +83,7 @@
    any/all/format not available in Python 2.4
   ./non-py24.py:11:
    >     try:
-   no try/except/finally in Py2.4
+   no try/except/finally in Python 2.4
   ./classstyle.py:4:
    > class oldstyle_class:
    old-style class, use class foo(object)
--- a/tests/test-clone.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-clone.t	Tue Sep 04 13:49:10 2012 -0700
@@ -558,7 +558,7 @@
   $ test -d d/.hg
   [1]
 
-reenable perm to allow deletion
+re-enable perm to allow deletion
 
   $ chmod +rx c/.hg/store/data
 
--- a/tests/test-convert.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-convert.t	Tue Sep 04 13:49:10 2012 -0700
@@ -60,8 +60,8 @@
   
       The authormap is a simple text file that maps each source commit author to
       a destination commit author. It is handy for source SCMs that use unix
-      logins to identify authors (eg: CVS). One line per author mapping and the
-      line format is:
+      logins to identify authors (e.g.: CVS). One line per author mapping and
+      the line format is:
   
         source author = destination author
   
--- a/tests/test-glog.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-glog.t	Tue Sep 04 13:49:10 2012 -0700
@@ -2044,20 +2044,40 @@
 Test --hidden
 
   $ cat > $HGTMP/testhidden.py << EOF
+  > from mercurial import util
   > def reposetup(ui, repo):
   >     for line in repo.opener('hidden'):
   >         ctx = repo[line.strip()]
   >         repo.hiddenrevs.add(ctx.rev())
+  >     if repo.revs('children(%ld) - %ld',  repo.hiddenrevs,  repo.hiddenrevs):
+  >       raise util.Abort('hidden revision with children!')
   > EOF
   $ echo '[extensions]' >> .hg/hgrc
   $ echo "hidden=$HGTMP/testhidden.py" >> .hg/hgrc
-  $ hg id --debug -i -r 0 > .hg/hidden
+  $ hg id --debug -i -r 8 > .hg/hidden
   $ testlog
   []
   []
   $ testlog --hidden
   []
   []
+  $ hg glog --template '{rev} {desc}\n'
+  o  7 Added tag foo-bar for changeset fc281d8ff18d
+  |
+  o    6 merge 5 and 4
+  |\
+  | o  5 add another e
+  | |
+  o |  4 mv dir/b e
+  |/
+  @  3 mv a b; add d
+  |
+  o  2 mv b dir/b
+  |
+  o  1 copy a b
+  |
+  o  0 add a
+  
 
 A template without trailing newline should do something sane
 
@@ -2066,6 +2086,8 @@
   |
   o  1 copy a b
   |
+  o  0 add a
+  
 
 Extra newlines must be preserved
 
@@ -2076,6 +2098,9 @@
   o
   |  1 copy a b
   |
+  o
+     0 add a
+  
 
 The almost-empty template should do something sane too ...
 
@@ -2084,5 +2109,7 @@
   |
   o
   |
+  o
+  
 
   $ cd ..
--- a/tests/test-hgweb-commands.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-hgweb-commands.t	Tue Sep 04 13:49:10 2012 -0700
@@ -980,11 +980,6 @@
   var graph = new Graph();
   graph.scale(39);
   
-  var revlink = '<li style="_STYLE"><span class="desc">';
-  revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
-  revlink += '</span> _TAGS';
-  revlink += '<span class="info">_DATE, by _USER</span></li>';
-  
   graph.vertex = function(x, y, color, parity, cur) {
   	
   	this.ctx.beginPath();
@@ -995,13 +990,6 @@
   	var bg = '<li class="bg parity' + parity + '"></li>';
   	var left = (this.columns + 1) * this.bg_height;
   	var nstyle = 'padding-left: ' + left + 'px;';
-  	var item = revlink.replace(/_STYLE/, nstyle);
-  	item = item.replace(/_PARITY/, 'parity' + parity);
-  	item = item.replace(/_NODEID/, cur[0]);
-  	item = item.replace(/_NODEID/, cur[0]);
-  	item = item.replace(/_DESC/, cur[3]);
-  	item = item.replace(/_USER/, cur[4]);
-  	item = item.replace(/_DATE/, cur[5]);
   	
   	var tagspan = '';
   	if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
@@ -1028,7 +1016,11 @@
   		tagspan += '</span>';
   	}
   	
-  	item = item.replace(/_TAGS/, tagspan);
+  	var item = '<li style="' + nstyle + '"><span class="desc">';
+  	item += '<a class="list" href="/rev/' + cur[0] + '?style=gitweb" title="' + cur[0] + '"><b>' + cur[3] + '</b></a>';
+  	item += '</span> ' + tagspan + '';
+  	item += '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
+  
   	return [bg, item];
   	
   }
--- a/tests/test-hgweb-empty.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-hgweb-empty.t	Tue Sep 04 13:49:10 2012 -0700
@@ -250,10 +250,6 @@
   var graph = new Graph();
   graph.scale(39);
   
-  var revlink = '<li style="_STYLE"><span class="desc">';
-  revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
-  revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
-  
   graph.vertex = function(x, y, color, parity, cur) {
   	
   	this.ctx.beginPath();
@@ -264,13 +260,6 @@
   	var bg = '<li class="bg parity' + parity + '"></li>';
   	var left = (this.columns + 1) * this.bg_height;
   	var nstyle = 'padding-left: ' + left + 'px;';
-  	var item = revlink.replace(/_STYLE/, nstyle);
-  	item = item.replace(/_PARITY/, 'parity' + parity);
-  	item = item.replace(/_NODEID/, cur[0]);
-  	item = item.replace(/_NODEID/, cur[0]);
-  	item = item.replace(/_DESC/, cur[3]);
-  	item = item.replace(/_USER/, cur[4]);
-  	item = item.replace(/_DATE/, cur[5]);
   
   	var tagspan = '';
   	if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
@@ -296,8 +285,11 @@
   		}
   		tagspan += '</span>';
   	}
+  
+  	var item = '<li style="' + nstyle + '"><span class="desc">';
+  	item += '<a href="/rev/' + cur[0] + '" title="' + cur[0] + '">' + cur[3] + '</a>';
+  	item += '</span>' + tagspan + '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
   	
-  	item = item.replace(/_TAGS/, tagspan);
   	return [bg, item];
   	
   }
--- a/tests/test-hybridencode.py	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-hybridencode.py	Tue Sep 04 13:49:10 2012 -0700
@@ -6,10 +6,43 @@
 enc = hybridencode # used for 'dotencode' repo format
 
 def show(s):
-    print "A = '%s'" % s
-    print "B = '%s'" % enc(s)
+    print "A = '%s'" % s.encode("string_escape")
+    print "B = '%s'" % enc(s).encode("string_escape")
     print
 
+show("data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&'()+,-.;=[]^`{}")
+
+print "uppercase char X is encoded as _x"
+show("data/ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+
+print "underbar is doubled"
+show("data/_")
+
+print "tilde is character-encoded"
+show("data/~")
+
+print "characters in ASCII code range 0..31"
+show('data/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f'
+          '\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f')
+
+print "characters in ASCII code range 126..255 (only partially tested)"
+show('data/\x7e \x7f \x80 \x81 \x82 \x83 .. \xfd \xfe \xff')
+
+print "Windows reserved characters"
+show('data/less <, greater >, colon :, double-quote ", backslash \\'
+           ', pipe |, question-mark ?, asterisk *')
+
+print "encoding directories ending in .hg, .i or .d with '.hg' suffix"
+show('data/x.hg/x.i/x.d/foo')
+
+print "but these are not encoded on *filenames*"
+show('data/foo/x.hg')
+show('data/foo/x.i')
+show('data/foo/x.d')
+
+print "plain .hg, .i and .d directories have the leading dot encoded"
+show('data/.hg/.i/.d/foo')
+
 show('data/aux.bla/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c.i')
 
 show('data/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/'
@@ -24,5 +57,47 @@
 show('data/Project.Planning/Resources/AnotherLongDirectoryName/'
      'Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt')
 show('data/foo.../foo   / /a./_. /__/.x../    bla/.FOO/something.i')
-show('data/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9')
-show('data/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9')
+
+show('data/c/co/com/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9')
+show('data/C/CO/COM/COM0/COM1/COM2/COM3/COM4/COM5/COM6/COM7/COM8/COM9')
+show('data/c.x/co.x/com.x/com0.x/com1.x/com2.x/com3.x/com4.x/com5.x'
+                                        '/com6.x/com7.x/com8.x/com9.x')
+show('data/x.c/x.co/x.com0/x.com1/x.com2/x.com3/x.com4/x.com5'
+                                        '/x.com6/x.com7/x.com8/x.com9')
+show('data/cx/cox/comx/com0x/com1x/com2x/com3x/com4x/com5x'
+                                            '/com6x/com7x/com8x/com9x')
+show('data/xc/xco/xcom0/xcom1/xcom2/xcom3/xcom4/xcom5'
+                                            '/xcom6/xcom7/xcom8/xcom9')
+
+show('data/l/lp/lpt/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9')
+show('data/L/LP/LPT/LPT0/LPT1/LPT2/LPT3/LPT4/LPT5/LPT6/LPT7/LPT8/LPT9')
+show('data/l.x/lp.x/lpt.x/lpt0.x/lpt1.x/lpt2.x/lpt3.x/lpt4.x/lpt5.x'
+                                        '/lpt6.x/lpt7.x/lpt8.x/lpt9.x')
+show('data/x.l/x.lp/x.lpt/x.lpt0/x.lpt1/x.lpt2/x.lpt3/x.lpt4/x.lpt5'
+                                        '/x.lpt6/x.lpt7/x.lpt8/x.lpt9')
+show('data/lx/lpx/lptx/lpt0x/lpt1x/lpt2x/lpt3x/lpt4x/lpt5x'
+                                            '/lpt6x/lpt7x/lpt8x/lpt9x')
+show('data/xl/xlp/xlpt/xlpt0/xlpt1/xlpt2/xlpt3/xlpt4/xlpt5'
+                                            '/xlpt6/xlpt7/xlpt8/xlpt9')
+
+show('data/con/p/pr/prn/a/au/aux/n/nu/nul')
+show('data/CON/P/PR/PRN/A/AU/AUX/N/NU/NUL')
+show('data/con.x/p.x/pr.x/prn.x/a.x/au.x/aux.x/n.x/nu.x/nul.x')
+show('data/x.con/x.p/x.pr/x.prn/x.a/x.au/x.aux/x.n/x.nu/x.nul')
+show('data/conx/px/prx/prnx/ax/aux/auxx/nx/nux/nulx')
+show('data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul')
+
+print "largest unhashed path"
+show('data/123456789-123456789-123456789-123456789-123456789-'
+          'unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-12345')
+
+print "shortest hashed path"
+show('data/123456789-123456789-123456789-123456789-123456789-'
+          'hashed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+
+print "changing one char in part that's hashed away produces a different hash"
+show('data/123456789-123456789-123456789-123456789-123456789-'
+          'hashed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxy-'
+          '123456789-123456')
--- a/tests/test-hybridencode.py.out	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-hybridencode.py.out	Tue Sep 04 13:49:10 2012 -0700
@@ -1,3 +1,48 @@
+A = 'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}'
+B = 'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}'
+
+uppercase char X is encoded as _x
+A = 'data/ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+B = 'data/_a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z'
+
+underbar is doubled
+A = 'data/_'
+B = 'data/__'
+
+tilde is character-encoded
+A = 'data/~'
+B = 'data/~7e'
+
+characters in ASCII code range 0..31
+A = 'data/\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'
+B = 'data/~00~01~02~03~04~05~06~07~08~09~0a~0b~0c~0d~0e~0f~10~11~12~13~14~15~16~17~18~19~1a~1b~1c~1d~1e~1f'
+
+characters in ASCII code range 126..255 (only partially tested)
+A = 'data/~ \x7f \x80 \x81 \x82 \x83 .. \xfd \xfe \xff'
+B = 'data/~7e ~7f ~80 ~81 ~82 ~83 .. ~fd ~fe ~ff'
+
+Windows reserved characters
+A = 'data/less <, greater >, colon :, double-quote ", backslash \\, pipe |, question-mark ?, asterisk *'
+B = 'data/less ~3c, greater ~3e, colon ~3a, double-quote ~22, backslash ~5c, pipe ~7c, question-mark ~3f, asterisk ~2a'
+
+encoding directories ending in .hg, .i or .d with '.hg' suffix
+A = 'data/x.hg/x.i/x.d/foo'
+B = 'data/x.hg.hg/x.i.hg/x.d.hg/foo'
+
+but these are not encoded on *filenames*
+A = 'data/foo/x.hg'
+B = 'data/foo/x.hg'
+
+A = 'data/foo/x.i'
+B = 'data/foo/x.i'
+
+A = 'data/foo/x.d'
+B = 'data/foo/x.d'
+
+plain .hg, .i and .d directories have the leading dot encoded
+A = 'data/.hg/.i/.d/foo'
+B = 'data/~2ehg.hg/~2ei.hg/~2ed.hg/foo'
+
 A = 'data/aux.bla/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c.i'
 B = 'data/au~78.bla/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i'
 
@@ -19,9 +64,69 @@
 A = 'data/foo.../foo   / /a./_. /__/.x../    bla/.FOO/something.i'
 B = 'data/foo..~2e/foo  ~20/~20/a~2e/__.~20/____/~2ex.~2e/~20   bla/~2e_f_o_o/something.i'
 
-A = 'data/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9'
-B = 'data/com0/co~6d1/co~6d2/co~6d3/co~6d4/co~6d5/co~6d6/co~6d7/co~6d8/co~6d9'
+A = 'data/c/co/com/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9'
+B = 'data/c/co/com/com0/co~6d1/co~6d2/co~6d3/co~6d4/co~6d5/co~6d6/co~6d7/co~6d8/co~6d9'
+
+A = 'data/C/CO/COM/COM0/COM1/COM2/COM3/COM4/COM5/COM6/COM7/COM8/COM9'
+B = 'data/_c/_c_o/_c_o_m/_c_o_m0/_c_o_m1/_c_o_m2/_c_o_m3/_c_o_m4/_c_o_m5/_c_o_m6/_c_o_m7/_c_o_m8/_c_o_m9'
+
+A = 'data/c.x/co.x/com.x/com0.x/com1.x/com2.x/com3.x/com4.x/com5.x/com6.x/com7.x/com8.x/com9.x'
+B = 'data/c.x/co.x/com.x/com0.x/co~6d1.x/co~6d2.x/co~6d3.x/co~6d4.x/co~6d5.x/co~6d6.x/co~6d7.x/co~6d8.x/co~6d9.x'
+
+A = 'data/x.c/x.co/x.com0/x.com1/x.com2/x.com3/x.com4/x.com5/x.com6/x.com7/x.com8/x.com9'
+B = 'data/x.c/x.co/x.com0/x.com1/x.com2/x.com3/x.com4/x.com5/x.com6/x.com7/x.com8/x.com9'
+
+A = 'data/cx/cox/comx/com0x/com1x/com2x/com3x/com4x/com5x/com6x/com7x/com8x/com9x'
+B = 'data/cx/cox/comx/com0x/com1x/com2x/com3x/com4x/com5x/com6x/com7x/com8x/com9x'
+
+A = 'data/xc/xco/xcom0/xcom1/xcom2/xcom3/xcom4/xcom5/xcom6/xcom7/xcom8/xcom9'
+B = 'data/xc/xco/xcom0/xcom1/xcom2/xcom3/xcom4/xcom5/xcom6/xcom7/xcom8/xcom9'
+
+A = 'data/l/lp/lpt/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9'
+B = 'data/l/lp/lpt/lpt0/lp~741/lp~742/lp~743/lp~744/lp~745/lp~746/lp~747/lp~748/lp~749'
+
+A = 'data/L/LP/LPT/LPT0/LPT1/LPT2/LPT3/LPT4/LPT5/LPT6/LPT7/LPT8/LPT9'
+B = 'data/_l/_l_p/_l_p_t/_l_p_t0/_l_p_t1/_l_p_t2/_l_p_t3/_l_p_t4/_l_p_t5/_l_p_t6/_l_p_t7/_l_p_t8/_l_p_t9'
+
+A = 'data/l.x/lp.x/lpt.x/lpt0.x/lpt1.x/lpt2.x/lpt3.x/lpt4.x/lpt5.x/lpt6.x/lpt7.x/lpt8.x/lpt9.x'
+B = 'data/l.x/lp.x/lpt.x/lpt0.x/lp~741.x/lp~742.x/lp~743.x/lp~744.x/lp~745.x/lp~746.x/lp~747.x/lp~748.x/lp~749.x'
+
+A = 'data/x.l/x.lp/x.lpt/x.lpt0/x.lpt1/x.lpt2/x.lpt3/x.lpt4/x.lpt5/x.lpt6/x.lpt7/x.lpt8/x.lpt9'
+B = 'data/x.l/x.lp/x.lpt/x.lpt0/x.lpt1/x.lpt2/x.lpt3/x.lpt4/x.lpt5/x.lpt6/x.lpt7/x.lpt8/x.lpt9'
+
+A = 'data/lx/lpx/lptx/lpt0x/lpt1x/lpt2x/lpt3x/lpt4x/lpt5x/lpt6x/lpt7x/lpt8x/lpt9x'
+B = 'data/lx/lpx/lptx/lpt0x/lpt1x/lpt2x/lpt3x/lpt4x/lpt5x/lpt6x/lpt7x/lpt8x/lpt9x'
 
-A = 'data/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9'
-B = 'data/lpt0/lp~741/lp~742/lp~743/lp~744/lp~745/lp~746/lp~747/lp~748/lp~749'
+A = 'data/xl/xlp/xlpt/xlpt0/xlpt1/xlpt2/xlpt3/xlpt4/xlpt5/xlpt6/xlpt7/xlpt8/xlpt9'
+B = 'data/xl/xlp/xlpt/xlpt0/xlpt1/xlpt2/xlpt3/xlpt4/xlpt5/xlpt6/xlpt7/xlpt8/xlpt9'
+
+A = 'data/con/p/pr/prn/a/au/aux/n/nu/nul'
+B = 'data/co~6e/p/pr/pr~6e/a/au/au~78/n/nu/nu~6c'
+
+A = 'data/CON/P/PR/PRN/A/AU/AUX/N/NU/NUL'
+B = 'data/_c_o_n/_p/_p_r/_p_r_n/_a/_a_u/_a_u_x/_n/_n_u/_n_u_l'
+
+A = 'data/con.x/p.x/pr.x/prn.x/a.x/au.x/aux.x/n.x/nu.x/nul.x'
+B = 'data/co~6e.x/p.x/pr.x/pr~6e.x/a.x/au.x/au~78.x/n.x/nu.x/nu~6c.x'
+
+A = 'data/x.con/x.p/x.pr/x.prn/x.a/x.au/x.aux/x.n/x.nu/x.nul'
+B = 'data/x.con/x.p/x.pr/x.prn/x.a/x.au/x.aux/x.n/x.nu/x.nul'
 
+A = 'data/conx/px/prx/prnx/ax/aux/auxx/nx/nux/nulx'
+B = 'data/conx/px/prx/prnx/ax/au~78/auxx/nx/nux/nulx'
+
+A = 'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul'
+B = 'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul'
+
+largest unhashed path
+A = 'data/123456789-123456789-123456789-123456789-123456789-unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
+B = 'data/123456789-123456789-123456789-123456789-123456789-unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
+
+shortest hashed path
+A = 'data/123456789-123456789-123456789-123456789-123456789-hashed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/123456789-123456789-123456789-123456789-123456789-hashed----xxxxxxxxx-xxxxxxxe9c55002b50bf5181e7a6fc1f60b126e2a6fcf71'
+
+changing one char in part that's hashed away produces a different hash
+A = 'data/123456789-123456789-123456789-123456789-123456789-hashed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxy-123456789-123456'
+B = 'dh/123456789-123456789-123456789-123456789-123456789-hashed----xxxxxxxxx-xxxxxxxd24fa4455faf8a94350c18e5eace7c2bb17af706'
+
--- a/tests/test-keyword.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-keyword.t	Tue Sep 04 13:49:10 2012 -0700
@@ -727,7 +727,7 @@
   ignore $Id$
   a
 
-Write custom keyword and prepare multiline commit message
+Write custom keyword and prepare multi-line commit message
 
   $ echo '$Xinfo$' >> a
   $ cat <<EOF >> log
@@ -745,7 +745,7 @@
   ? c
   ? log
 
-Commit with multiline message and custom expansion
+Commit with multi-line message and custom expansion
 
   $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   a
--- a/tests/test-phases-exchange.t	Tue Aug 21 16:06:34 2012 -0700
+++ b/tests/test-phases-exchange.t	Tue Sep 04 13:49:10 2012 -0700
@@ -84,7 +84,7 @@
   
 
 pull did not updated ../alpha state.
-push from alpha to beta should update phase even if nothing is transfered
+push from alpha to beta should update phase even if nothing is transferred
 
   $ cd ../alpha
   $ hgph # not updated by remote pull