changeset 12244:f6a6d661953c

i18n-ro: merged default
author Daniel Dumitriu <daniel.dumitriu@gmail.com>
date Wed, 01 Sep 2010 10:13:55 +0200
parents ff927933442b (diff) 4403ba5f9009 (current diff)
children e1cf13e9e051
files
diffstat 41 files changed, 508 insertions(+), 1114 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsigs	Thu Aug 26 16:32:12 2010 +0200
+++ b/.hgsigs	Wed Sep 01 10:13:55 2010 +0200
@@ -26,3 +26,4 @@
 f786fc4b8764cd2a5526d259cf2f94d8a66924d9 0 iEYEABECAAYFAkwsyxcACgkQywK+sNU5EO+crACfUpNAF57PmClkSri9nJcBjb2goN4AniPCNaKvnki7TnUsi1u2oxltpKKL
 bf1774d95bde614af3956d92b20e2a0c68c5fec7 0 iEYEABECAAYFAkxVwccACgkQywK+sNU5EO+oFQCeJzwZ+we1fIIyBGCddHceOUAN++cAnjvT6A8ZWW0zV21NXIFF1qQmjxJd
 c00f03a4982e467fb6b6bd45908767db6df4771d 0 iEYEABECAAYFAkxXDqsACgkQywK+sNU5EO/GJACfT9Rz4hZOxPQEs91JwtmfjevO84gAmwSmtfo5mmWSm8gtTUebCcdTv0Kf
+ff5cec76b1c5b6be9c3bb923aae8c3c6d079d6b9 0 iD8DBQBMdo+qywK+sNU5EO8RAqQpAJ975BL2CCAiWMz9SXthNQ9xG181IwCgp4O+KViHPkufZVFn2aTKMNvcr1A=
--- a/.hgtags	Thu Aug 26 16:32:12 2010 +0200
+++ b/.hgtags	Wed Sep 01 10:13:55 2010 +0200
@@ -38,3 +38,4 @@
 f786fc4b8764cd2a5526d259cf2f94d8a66924d9 1.6
 bf1774d95bde614af3956d92b20e2a0c68c5fec7 1.6.1
 c00f03a4982e467fb6b6bd45908767db6df4771d 1.6.2
+ff5cec76b1c5b6be9c3bb923aae8c3c6d079d6b9 1.6.3
--- a/contrib/compress.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/contrib/compress.py	Wed Sep 01 10:13:55 2010 +0200
@@ -7,50 +7,55 @@
 # GNU General Public License version 2 or any later version.
 
 
-from mercurial import hg, ui, transaction, util, changegroup, localrepo, merge
-import sys, os
+from mercurial import hg, localrepo
+from mercurial.lock import release
+import weakref
 
-def compress(ui, repo, dest, **opts):
-    dest = os.path.realpath(util.expandpath(dest))
-    target = localrepo.instance(ui, dest, create=1)
-    tr = transaction.transaction(sys.stderr.write,
-                                 util.opener('.', False), "compress")
-    src_cl = repo.changelog
-    tar_cl = target.changelog
-    changedfiles = set()
-    mmfs = {}
-    collect = changegroup.collector(src_cl, mmfs, changedfiles)
-    total = len(repo)
-    opener = target.sopener
+def _copyrevlog(ui, src, dst, tr, progress=None):
+    if progress:
+        desc = 'adding %s' % progress
+        total = len(src)
+        def progress(count):
+            ui.progress(desc, count, unit=('revisions'), total=total)
+    else:
+        progress = lambda x: None
+    for r in src:
+        p = [src.node(i) for i in src.parentrevs(r)]
+        dst.addrevision(src.revision(src.node(r)), tr, src.linkrev(r),
+                        p[0], p[1])
+        progress(r)
+
+def compress(ui, repo, dest):
+    # activate parentdelta
+    ui.setconfig('format', 'parentdelta', 'on')
+    dest = hg.localpath(ui.expandpath(dest))
+    target = localrepo.instance(ui, dest, create=True)
 
-    for r in src_cl:
-        p = [src_cl.node(i) for i in src_cl.parentrevs(r)]
-        nd = tar_cl.addrevision(src_cl.revision(src_cl.node(r)), tr,
-                                 src_cl.linkrev(r), p[0], p[1])
-        collect(nd)
-        ui.progress(('adding changesets'), r, unit=('revisions'),
-                    total=total)
+    tr = lock = tlock = None
+    try:
+        lock = repo.lock()
+        tlock = target.lock()
+        tr = target.transaction("compress")
+        trp = weakref.proxy(tr)
+
+        _copyrevlog(ui, repo.manifest, target.manifest, trp, 'manifest')
 
-    src_mnfst = repo.manifest
-    tar_mnfst = target.manifest
-    for r in src_mnfst:
-        p = [src_mnfst.node(i) for i in src_mnfst.parentrevs(r)]
-        tar_mnfst.addrevision(src_mnfst.revision(src_mnfst.node(r)), tr,
-                               src_mnfst.linkrev(r), p[0], p[1])
-        ui.progress(('adding manifest'), r, unit=('revisions'),
-                    total=total)
+        # only keep indexes and filter "data/" prefix and ".i" suffix
+        datafiles = [fn[5:-2] for fn, f2, size in repo.store.datafiles()
+                                      if size and fn.endswith('.i')]
+        total = len(datafiles)
+        for cnt, f in enumerate(datafiles):
+            _copyrevlog(ui, repo.file(f), target.file(f), trp)
+            ui.progress(('adding files'), cnt, item=f, unit=('file'),
+                        total=total)
 
-    total = len(changedfiles)
-    for cnt, f in enumerate(changedfiles):
-        sf = repo.file(f)
-        tf = target.file(f)
-        for r in sf:
-            p = [sf.node(i) for i in sf.parentrevs(r)]
-            a = tf.addrevision(sf.revision(sf.node(r)), tr, sf.linkrev(r),
-                               p[0], p[1])
-        ui.progress(('adding files'), cnt, item=f, unit=('file'), total=total)
+        _copyrevlog(ui, repo.changelog, target.changelog, trp, 'changesets')
 
-    tr.close()
+        tr.close()
+    finally:
+        if tr:
+            tr.release()
+        release(tlock, lock)
 
 cmdtable = {
     "compress" : (compress, [], "DEST")
--- a/hgext/bookmarks.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/hgext/bookmarks.py	Wed Sep 01 10:13:55 2010 +0200
@@ -370,6 +370,11 @@
     repo.__class__ = bookmark_repo
 
 def listbookmarks(repo):
+    # We may try to list bookmarks on a repo type that does not
+    # support it (e.g., statichttprepository).
+    if not hasattr(repo, '_bookmarks'):
+        return {}
+
     d = {}
     for k, v in repo._bookmarks.iteritems():
         d[k] = hex(v)
--- a/hgext/mq.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/hgext/mq.py	Wed Sep 01 10:13:55 2010 +0200
@@ -2928,13 +2928,21 @@
     entry = extensions.wrapcommand(commands.table, 'init', mqinit)
     entry[1].extend(mqopt)
 
-    norepo = commands.norepo.split(" ")
-    for cmd in commands.table.keys():
-        cmd = cmdutil.parsealiases(cmd)[0]
-        if cmd in norepo:
-            continue
-        entry = extensions.wrapcommand(commands.table, cmd, mqcommand)
-        entry[1].extend(mqopt)
+    nowrap = set(commands.norepo.split(" ") + ['qrecord'])
+
+    def dotable(cmdtable):
+        for cmd in cmdtable.keys():
+            cmd = cmdutil.parsealiases(cmd)[0]
+            if cmd in nowrap:
+                continue
+            entry = extensions.wrapcommand(cmdtable, cmd, mqcommand)
+            entry[1].extend(mqopt)
+
+    dotable(commands.table)
+
+    for extname, extmodule in extensions.extensions():
+        if extmodule.__file__ != __file__:
+            dotable(getattr(extmodule, 'cmdtable', {}))
 
 seriesopts = [('s', 'summary', None, _('print first line of patch header'))]
 
--- a/i18n/da.po	Thu Aug 26 16:32:12 2010 +0200
+++ b/i18n/da.po	Wed Sep 01 10:13:55 2010 +0200
@@ -18,7 +18,7 @@
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
 "POT-Creation-Date: 2010-08-15 17:28+0200\n"
-"PO-Revision-Date: 2010-08-15 18:57+0200\n"
+"PO-Revision-Date: 2010-08-26 08:58+0200\n"
 "Last-Translator: <mg@lazybytes.net>\n"
 "Language-Team: Danish\n"
 "Language: \n"
@@ -4122,7 +4122,7 @@
 msgstr "kan ikke deponere henover en anvendt mq rettelse"
 
 msgid "source has mq patches applied"
-msgstr "målet har mq rettelser anvendt"
+msgstr "kilden har mq rettelser anvendt"
 
 #, python-format
 msgid "mq status file refers to unknown node %s\n"
--- a/i18n/de.po	Thu Aug 26 16:32:12 2010 +0200
+++ b/i18n/de.po	Wed Sep 01 10:13:55 2010 +0200
@@ -19623,7 +19623,7 @@
 "Datenübergabe unterbrochen\n"
 
 msgid "abort: out of memory\n"
-msgstr "Abbruch: Unzureichender Speicherplatz\n"
+msgstr "Abbruch: Unzureichender Arbeitsspeicher\n"
 
 msgid "** unknown exception encountered, details follow\n"
 msgstr "** Unbekannter Fehler, Details folgen\n"
--- a/i18n/pt_BR.po	Thu Aug 26 16:32:12 2010 +0200
+++ b/i18n/pt_BR.po	Wed Sep 01 10:13:55 2010 +0200
@@ -10822,6 +10822,10 @@
 msgid "not found in manifest"
 msgstr "não encontrado no manifesto"
 
+#, python-format
+msgid "No such file in rev %s"
+msgstr "Não há tal arquivo na revisão %s"
+
 msgid "branch name not in UTF-8!"
 msgstr "nome do ramo não está em UTF-8!"
 
@@ -11187,6 +11191,9 @@
 msgid "merging %s failed!\n"
 msgstr "mesclagem de %s falhou!\n"
 
+msgid "starting revisions are not directly related"
+msgstr "as revisões iniciais não são diretamente relacionadas"
+
 #, python-format
 msgid "Inconsistent state, %s:%s is good and bad"
 msgstr "Estado inconsistente, %s:%s é bom e ruim"
@@ -13823,6 +13830,10 @@
 msgid "error reading %s/.hg/hgrc: %s\n"
 msgstr "erro ao ler %s/.hg/hgrc: %s\n"
 
+#, python-format
+msgid "error accessing repository at %s\n"
+msgstr "erro ao acessar o repositório em %s\n"
+
 msgid "SSL support is unavailable"
 msgstr "Suporte a SSL indisponível"
 
--- a/mercurial/bundlerepo.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/bundlerepo.py	Wed Sep 01 10:13:55 2010 +0200
@@ -13,7 +13,7 @@
 
 from node import nullid
 from i18n import _
-import os, struct, bz2, zlib, tempfile, shutil
+import os, struct, tempfile, shutil
 import changegroup, util, mdiff
 import localrepo, changelog, manifest, filelog, revlog, error
 
@@ -172,43 +172,27 @@
 
         self.tempfile = None
         self.bundlefile = open(bundlename, "rb")
-        header = self.bundlefile.read(6)
-        if not header.startswith("HG"):
-            raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename)
-        elif not header.startswith("HG10"):
-            raise util.Abort(_("%s: unknown bundle version") % bundlename)
-        elif (header == "HG10BZ") or (header == "HG10GZ"):
+        b = changegroup.readbundle(self.bundlefile, bundlename)
+        if b.compressed():
             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
                                             suffix=".hg10un", dir=self.path)
             self.tempfile = temp
             fptemp = os.fdopen(fdtemp, 'wb')
-            def generator(f):
-                if header == "HG10BZ":
-                    zd = bz2.BZ2Decompressor()
-                    zd.decompress("BZ")
-                elif header == "HG10GZ":
-                    zd = zlib.decompressobj()
-                for chunk in f:
-                    yield zd.decompress(chunk)
-            gen = generator(util.filechunkiter(self.bundlefile, 4096))
 
             try:
                 fptemp.write("HG10UN")
-                for chunk in gen:
+                while 1:
+                    chunk = b.read(2**18)
+                    if not chunk:
+                        break
                     fptemp.write(chunk)
             finally:
                 fptemp.close()
                 self.bundlefile.close()
 
             self.bundlefile = open(self.tempfile, "rb")
-            # seek right after the header
             self.bundlefile.seek(6)
-        elif header == "HG10UN":
-            # nothing to do
-            pass
-        else:
-            raise util.Abort(_("%s: unknown bundle compression type")
-                             % bundlename)
+
         # dict with the mapping 'filename' -> position in the bundle
         self.bundlefilespos = {}
 
--- a/mercurial/changegroup.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/changegroup.py	Wed Sep 01 10:13:55 2010 +0200
@@ -120,34 +120,51 @@
         if cleanup is not None:
             os.unlink(cleanup)
 
-def unbundle(header, fh):
-    if header == 'HG10UN':
+def decompressor(fh, alg):
+    if alg == 'UN':
         return fh
-    elif not header.startswith('HG'):
-        # old client with uncompressed bundle
-        def generator(f):
-            yield header
-            for chunk in f:
-                yield chunk
-    elif header == 'HG10GZ':
+    elif alg == 'GZ':
         def generator(f):
             zd = zlib.decompressobj()
             for chunk in f:
                 yield zd.decompress(chunk)
-    elif header == 'HG10BZ':
+    elif alg == 'BZ':
         def generator(f):
             zd = bz2.BZ2Decompressor()
             zd.decompress("BZ")
             for chunk in util.filechunkiter(f, 4096):
                 yield zd.decompress(chunk)
-    return util.chunkbuffer(generator(fh))
+    else:
+        raise util.Abort("unknown bundle compression '%s'" % alg)
+    return generator(fh)
+
+class unbundle10(object):
+    def __init__(self, fh, alg):
+        self._stream = util.chunkbuffer(decompressor(fh, alg))
+        self._type = alg
+    def compressed(self):
+        return self._type != 'UN'
+    def read(self, l):
+        return self._stream.read(l)
 
 def readbundle(fh, fname):
     header = fh.read(6)
-    if not header.startswith('HG'):
-        raise util.Abort(_('%s: not a Mercurial bundle file') % fname)
-    if not header.startswith('HG10'):
-        raise util.Abort(_('%s: unknown bundle version') % fname)
-    elif header not in bundletypes:
-        raise util.Abort(_('%s: unknown bundle compression type') % fname)
-    return unbundle(header, fh)
+
+    if not fname:
+        fname = "stream"
+        if not header.startswith('HG') and header.startswith('\0'):
+            # headerless bundle, clean things up
+            def fixup(f, h):
+                yield h
+                for x in f:
+                    yield x
+            fh = fixup(fh, header)
+            header = "HG10UN"
+
+    magic, version, alg = header[0:2], header[2:4], header[4:6]
+
+    if magic != 'HG':
+        raise util.Abort(_('%s: not a Mercurial bundle') % fname)
+    if version != '10':
+        raise util.Abort(_('%s: unknown bundle version %s') % (fname, version))
+    return unbundle10(fh, alg)
--- a/mercurial/cmdutil.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/cmdutil.py	Wed Sep 01 10:13:55 2010 +0200
@@ -297,7 +297,7 @@
             unknown.append(abs)
             if repo.ui.verbose or not exact:
                 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
-        elif repo.dirstate[abs] != 'r' and (not good or not util.lexists(target)
+        elif repo.dirstate[abs] != 'r' and (not good or not os.path.lexists(target)
             or (os.path.isdir(target) and not os.path.islink(target))):
             deleted.append(abs)
             if repo.ui.verbose or not exact:
--- a/mercurial/commands.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/commands.py	Wed Sep 01 10:13:55 2010 +0200
@@ -3166,7 +3166,8 @@
             target = repo.wjoin(abs)
             def handle(xlist, dobackup):
                 xlist[0].append(abs)
-                if dobackup and not opts.get('no_backup') and util.lexists(target):
+                if (dobackup and not opts.get('no_backup') and
+                    os.path.lexists(target)):
                     bakname = "%s.orig" % rel
                     ui.note(_('saving current version of %s as %s\n') %
                             (rel, bakname))
--- a/mercurial/context.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/context.py	Wed Sep 01 10:13:55 2010 +0200
@@ -198,7 +198,7 @@
             if match(fn):
                 yield fn
         for fn in sorted(fset):
-            if match.bad(fn, 'No such file in rev ' + str(self)) and match(fn):
+            if match.bad(fn, _('No such file in rev %s') % self) and match(fn):
                 yield fn
 
     def sub(self, path):
--- a/mercurial/dispatch.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/dispatch.py	Wed Sep 01 10:13:55 2010 +0200
@@ -189,7 +189,7 @@
 
 class cmdalias(object):
     def __init__(self, name, definition, cmdtable):
-        self.name = name
+        self.name = self.cmd = name
         self.definition = definition
         self.args = []
         self.opts = []
@@ -198,7 +198,11 @@
         self.badalias = False
 
         try:
-            cmdutil.findcmd(self.name, cmdtable, True)
+            aliases, entry = cmdutil.findcmd(self.name, cmdtable)
+            for alias, e in cmdtable.iteritems():
+                if e is entry:
+                    self.cmd = alias
+                    break
             self.shadows = True
         except error.UnknownCommand:
             self.shadows = False
@@ -295,7 +299,7 @@
     # but only if they have been defined prior to the current definition.
     for alias, definition in ui.configitems('alias'):
         aliasdef = cmdalias(alias, definition, cmdtable)
-        cmdtable[alias] = (aliasdef, aliasdef.opts, aliasdef.help)
+        cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
         if aliasdef.norepo:
             commands.norepo += ' %s' % alias
 
--- a/mercurial/filemerge.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/filemerge.py	Wed Sep 01 10:13:55 2010 +0200
@@ -225,7 +225,8 @@
 
     if not r and (_toolbool(ui, tool, "checkconflicts") or
                   'conflicts' in _toollist(ui, tool, "check")):
-        if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data()):
+        if re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data(),
+                     re.MULTILINE):
             r = 1
 
     checked = False
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Sep 01 10:13:55 2010 +0200
@@ -233,6 +233,10 @@
                 # update time with local timezone
                 try:
                     r = hg.repository(self.ui, path)
+                except error.RepoError:
+                    u.warn(_('error accessing repository at %s\n') % path)
+                    continue
+                try:
                     d = (get_mtime(r.spath), util.makedate()[1])
                 except OSError:
                     continue
--- a/mercurial/localrepo.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/localrepo.py	Wed Sep 01 10:13:55 2010 +0200
@@ -482,9 +482,6 @@
     def wjoin(self, f):
         return os.path.join(self.root, f)
 
-    def rjoin(self, f):
-        return os.path.join(self.root, util.pconvert(f))
-
     def file(self, f):
         if f[0] == '/':
             f = f[1:]
--- a/mercurial/manifest.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/manifest.py	Wed Sep 01 10:13:55 2010 +0200
@@ -36,9 +36,7 @@
 
     def readdelta(self, node):
         r = self.rev(node)
-        if self._parentdelta:
-            return self.parse(mdiff.patchtext(self.revdiff(self.deltaparent(r), r)))
-        return self.parse(mdiff.patchtext(self.revdiff(r - 1, r)))
+        return self.parse(mdiff.patchtext(self.revdiff(self.deltaparent(r), r)))
 
     def read(self, node):
         if node == revlog.nullid:
--- a/mercurial/mdiff.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/mdiff.py	Wed Sep 01 10:13:55 2010 +0200
@@ -260,6 +260,9 @@
     return "".join(t)
 
 def patch(a, bin):
+    if len(a) == 0:
+        # skip over trivial delta header
+        return buffer(bin, 12)
     return mpatch.patches(a, [bin])
 
 # similar to difflib.SequenceMatcher.get_matching_blocks
--- a/mercurial/merge.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/merge.py	Wed Sep 01 10:13:55 2010 +0200
@@ -282,7 +282,7 @@
 
     # remove renamed files after safely stored
     for f in moves:
-        if util.lexists(repo.wjoin(f)):
+        if os.path.lexists(repo.wjoin(f)):
             repo.ui.debug("removing %s\n" % f)
             os.unlink(repo.wjoin(f))
 
@@ -320,7 +320,7 @@
                 else:
                     merged += 1
             util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags)
-            if f != fd and move and util.lexists(repo.wjoin(f)):
+            if f != fd and move and os.path.lexists(repo.wjoin(f)):
                 repo.ui.debug("removing %s\n" % f)
                 os.unlink(repo.wjoin(f))
         elif m == "g": # get
--- a/mercurial/patch.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/patch.py	Wed Sep 01 10:13:55 2010 +0200
@@ -918,7 +918,7 @@
     nulla = afile_orig == "/dev/null"
     nullb = bfile_orig == "/dev/null"
     abase, afile = pathstrip(afile_orig, strip)
-    gooda = not nulla and util.lexists(afile)
+    gooda = not nulla and os.path.lexists(afile)
     bbase, bfile = pathstrip(bfile_orig, strip)
     if afile == bfile:
         goodb = gooda
--- a/mercurial/repo.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/repo.py	Wed Sep 01 10:13:55 2010 +0200
@@ -35,10 +35,3 @@
 
     def cancopy(self):
         return self.local()
-
-    def rjoin(self, path):
-        url = self.url()
-        if url.endswith('/'):
-            return url + path
-        else:
-            return url + '/' + path
--- a/mercurial/revlog.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/revlog.py	Wed Sep 01 10:13:55 2010 +0200
@@ -550,8 +550,7 @@
         return self.index[rev][3]
     def flags(self, rev):
         return self.index[rev][0] & 0xFFFF
-
-    def size(self, rev):
+    def rawsize(self, rev):
         """return the length of the uncompressed text for a given revision"""
         l = self.index[rev][2]
         if l >= 0:
@@ -559,6 +558,7 @@
 
         t = self.revision(self.node(rev))
         return len(t)
+    size = rawsize
 
     def reachable(self, node, stop=None):
         """return the set of all nodes ancestral to a given node, including
@@ -1018,16 +1018,14 @@
 
     def deltaparent(self, rev):
         """return previous revision or parentrev according to flags"""
-        if self.base(rev) == rev:
-            return nullrev
-        elif self.flags(rev) & REVIDX_PARENTDELTA:
+        if self.flags(rev) & REVIDX_PARENTDELTA:
             return self.parentrevs(rev)[0]
         else:
             return rev - 1
 
     def revdiff(self, rev1, rev2):
         """return or calculate a delta between two revisions"""
-        if rev1 != nullrev and self.deltaparent(rev2) == rev1:
+        if self.base(rev2) != rev2 and self.deltaparent(rev2) == rev1:
             return self._chunk(rev2)
 
         return mdiff.textdiff(self.revision(self.node(rev1)),
@@ -1137,27 +1135,27 @@
         transaction - the transaction object used for rollback
         link - the linkrev data to add
         p1, p2 - the parent nodeids of the revision
-        d - an optional precomputed delta
+        cachedelta - an optional precomputed delta
         """
+        node = hash(text, p1, p2)
+        if (node in self.nodemap and
+            (not self.flags(self.rev(node)) & REVIDX_PUNCHED_FLAG)):
+            return node
+
         dfh = None
         if not self._inline:
             dfh = self.opener(self.datafile, "a")
         ifh = self.opener(self.indexfile, "a+")
         try:
-            return self._addrevision(text, transaction, link, p1, p2,
+            return self._addrevision(node, text, transaction, link, p1, p2,
                                      cachedelta, ifh, dfh)
         finally:
             if dfh:
                 dfh.close()
             ifh.close()
 
-    def _addrevision(self, text, transaction, link, p1, p2,
+    def _addrevision(self, node, text, transaction, link, p1, p2,
                      cachedelta, ifh, dfh):
-        node = hash(text, p1, p2)
-        if (node in self.nodemap and
-            (not self.flags(self.rev(node)) & REVIDX_PUNCHED_FLAG)):
-            return node
-
         curr = len(self)
         prev = curr - 1
         base = curr
@@ -1355,15 +1353,10 @@
                         dfh.flush()
                     ifh.flush()
                     text = self.revision(chain)
-                    if len(text) == 0:
-                        # skip over trivial delta header
-                        # text == '' in the case of nullrev or punched revision
-                        text = buffer(delta, 12)
-                    else:
-                        text = mdiff.patches(text, [delta])
+                    text = mdiff.patch(text, delta)
                     del delta
-                    chk = self._addrevision(text, transaction, link, p1, p2, None,
-                                            ifh, dfh)
+                    chk = self._addrevision(node, text, transaction, link,
+                                            p1, p2, None, ifh, dfh)
                     if not dfh and not self._inline:
                         # addrevision switched from inline to conventional
                         # reopen the index
--- a/mercurial/statichttprepo.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/statichttprepo.py	Wed Sep 01 10:13:55 2010 +0200
@@ -129,6 +129,7 @@
         self._branchcachetip = None
         self.encodepats = None
         self.decodepats = None
+        self.capabilities.remove("pushkey")
 
     def url(self):
         return self._url
--- a/mercurial/util.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/util.py	Wed Sep 01 10:13:55 2010 +0200
@@ -431,15 +431,6 @@
 
     return check
 
-# os.path.lexists is not available on python2.3
-def lexists(filename):
-    "test whether a file with this name exists. does not follow symlinks"
-    try:
-        os.lstat(filename)
-    except:
-        return False
-    return True
-
 def unlink(f):
     """unlink and remove the directory if it is empty"""
     os.unlink(f)
--- a/mercurial/wireproto.py	Thu Aug 26 16:32:12 2010 +0200
+++ b/mercurial/wireproto.py	Wed Sep 01 10:13:55 2010 +0200
@@ -294,13 +294,7 @@
 
             # push can proceed
             fp.seek(0)
-            header = fp.read(6)
-            if header.startswith('HG'):
-                if not header.startswith('HG10'):
-                    raise ValueError('unknown bundle version')
-                elif header not in changegroupmod.bundletypes:
-                    raise ValueError('unknown bundle compression type')
-            gen = changegroupmod.unbundle(header, fp)
+            gen = changegroupmod.readbundle(fp, None)
 
             try:
                 r = repo.addchangegroup(gen, 'serve', proto._client(),
--- a/tests/test-bundle-type.t	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-bundle-type.t	Wed Sep 01 10:13:55 2010 +0200
@@ -87,7 +87,7 @@
   $ hg init tgarbage
   $ cd tgarbage
   $ hg pull ../bgarbage
-  abort: ../bgarbage: not a Mercurial bundle file
+  abort: ../bgarbage: not a Mercurial bundle
   $ cd ..
 
 test invalid bundle type
--- a/tests/test-convert-cvs	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-convert-cvs	Wed Sep 01 10:13:55 2010 +0200
@@ -132,12 +132,22 @@
     sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
 cd ..
 
+echo % commit new file revisions with some fuzz
+cd src
+echo f >> a
+cvscall -q commit -mfuzzy . | grep '<--' |\
+    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
+sleep 4 # the two changes will be split if fuzz < 4
+echo g >> b/c
+cvscall -q commit -mfuzzy . | grep '<--' |\
+    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
+cd ..
+
 echo % convert again
-hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
+hg convert --config convert.cvsps.fuzz=2 src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
 
-echo "graphlog = " >> $HGRCPATH
 hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
 
 echo % testing debugcvsps
 cd src
-hg debugcvsps | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' 
+hg debugcvsps --fuzz=2 | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' 
--- a/tests/test-convert-cvs.out	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-convert-cvs.out	Wed Sep 01 10:13:55 2010 +0200
@@ -150,18 +150,27 @@
 0 Initial revision files: b/c
 % commit a new revision with funny log message
 checking in src/a,v
+% commit new file revisions with some fuzz
+checking in src/a,v
+checking in src/b/c,v
 % convert again
 connecting to cvsrepo
 scanning source...
 collecting CVS rlog
-9 log entries
-cvslog hook: 9 entries
+11 log entries
+cvslog hook: 11 entries
 creating changesets
-6 changeset entries
-cvschangesets hook: 6 changesets
+8 changeset entries
+cvschangesets hook: 8 changesets
 sorting...
 converting...
-0 funny
+2 funny
+1 fuzzy
+0 fuzzy
+o  8 (branch) fuzzy files: b/c
+|
+o  7 (branch) fuzzy files: a
+|
 o  6 (branch) funny
 |  ----------------------------
 |  log message files: a
@@ -179,11 +188,11 @@
 
 % testing debugcvsps
 collecting CVS rlog
-9 log entries
-cvslog hook: 9 entries
+11 log entries
+cvslog hook: 11 entries
 creating changesets
-8 changeset entries
-cvschangesets hook: 8 changesets
+10 changeset entries
+cvschangesets hook: 10 changesets
 ---------------------
 PatchSet 1 
 Date:
@@ -286,3 +295,27 @@
 Members: 
 	a:1.2->1.2.2.1 
 
+---------------------
+PatchSet 9 
+Date:
+Author:
+Branch: branch
+Tag: (none) 
+Log:
+fuzzy
+
+Members: 
+	a:1.2.2.1->1.2.2.2 
+
+---------------------
+PatchSet 10 
+Date:
+Author:
+Branch: branch
+Tag: (none) 
+Log:
+fuzzy
+
+Members: 
+	b/c:1.1.2.1->1.1.2.2 
+
--- a/tests/test-dispatch	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-dispatch	Wed Sep 01 10:13:55 2010 +0200
@@ -21,10 +21,6 @@
 EOF
 hg cat a
 
-echo '% working directory removed'
-sh -c "cd $dir && rm -rf a"
-hg --version 2>&1 | sed -e 's,\(abort:.*:\).*$,\1 ...,g'
-
 echo '% no repo'
 cd $dir
 hg cat
--- a/tests/test-dispatch.out	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-dispatch.out	Wed Sep 01 10:13:55 2010 +0200
@@ -33,7 +33,5 @@
 % [defaults]
 a
 a: No such file in rev 000000000000
-% working directory removed
-abort: error getting current working directory: ...
 % no repo
 abort: There is no Mercurial repository here (.hg not found)!
--- a/tests/test-export	Thu Aug 26 16:32:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-hg init repo
-cd repo
-touch foo
-hg add foo
-for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
-    echo "foo-$i" >> foo
-    hg ci -m "foo-$i"
-done
-
-for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
-    echo "# foo-$out.patch"
-    hg export -v -o "foo-$out.patch" 2:tip
-done
-
-echo "# exporting 4 changesets to a file"
-hg export -o export_internal 1 2 3 4
-grep HG export_internal | wc -l | sed -e 's/^ *//'
-echo "# exporting 4 changesets to a file"
-hg export 1 2 3 4 | grep HG | wc -l | sed -e 's/^ *//'
-echo "# exporting revision -2 to a file"
-hg export -- -2
--- a/tests/test-export.out	Thu Aug 26 16:32:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-# foo-%nof%N.patch
-exporting patches:
-foo-01of10.patch
-foo-02of10.patch
-foo-03of10.patch
-foo-04of10.patch
-foo-05of10.patch
-foo-06of10.patch
-foo-07of10.patch
-foo-08of10.patch
-foo-09of10.patch
-foo-10of10.patch
-# foo-%%%H.patch
-exporting patches:
-foo-%617188a1c80f869a7b66c85134da88a6fb145f67.patch
-foo-%dd41a5ff707a5225204105611ba49cc5c229d55f.patch
-foo-%f95a5410f8664b6e1490a4af654e4b7d41a7b321.patch
-foo-%4346bcfde53b4d9042489078bcfa9c3e28201db2.patch
-foo-%afda8c3a009cc99449a05ad8aa4655648c4ecd34.patch
-foo-%35284ce2b6b99c9d2ac66268fe99e68e1974e1aa.patch
-foo-%9688c41894e6931305fa7165a37f6568050b4e9b.patch
-foo-%747d3c68f8ec44bb35816bfcd59aeb50b9654c2f.patch
-foo-%5f17a83f5fbd9414006a5e563eab4c8a00729efd.patch
-foo-%f3acbafac161ec68f1598af38f794f28847ca5d3.patch
-# foo-%b-%R.patch
-exporting patches:
-foo-repo-2.patch
-foo-repo-3.patch
-foo-repo-4.patch
-foo-repo-5.patch
-foo-repo-6.patch
-foo-repo-7.patch
-foo-repo-8.patch
-foo-repo-9.patch
-foo-repo-10.patch
-foo-repo-11.patch
-# foo-%h.patch
-exporting patches:
-foo-617188a1c80f.patch
-foo-dd41a5ff707a.patch
-foo-f95a5410f866.patch
-foo-4346bcfde53b.patch
-foo-afda8c3a009c.patch
-foo-35284ce2b6b9.patch
-foo-9688c41894e6.patch
-foo-747d3c68f8ec.patch
-foo-5f17a83f5fbd.patch
-foo-f3acbafac161.patch
-# foo-%r.patch
-exporting patches:
-foo-02.patch
-foo-03.patch
-foo-04.patch
-foo-05.patch
-foo-06.patch
-foo-07.patch
-foo-08.patch
-foo-09.patch
-foo-10.patch
-foo-11.patch
-# exporting 4 changesets to a file
-4
-# exporting 4 changesets to a file
-4
-# exporting revision -2 to a file
-# HG changeset patch
-# User test
-# Date 0 0
-# Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
-# Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
-foo-10
-
-diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
---- a/foo	Thu Jan 01 00:00:00 1970 +0000
-+++ b/foo	Thu Jan 01 00:00:00 1970 +0000
-@@ -8,3 +8,4 @@
- foo-7
- foo-8
- foo-9
-+foo-10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-export.t	Wed Sep 01 10:13:55 2010 +0200
@@ -0,0 +1,110 @@
+  $ hg init repo
+  $ cd repo
+  $ touch foo
+  $ hg add foo
+  $ for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
+  >    echo "foo-$i" >> foo
+  >    hg ci -m "foo-$i"
+  > done
+
+  $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
+  >    echo
+  >    echo "# foo-$out.patch"
+  >    hg export -v -o "foo-$out.patch" 2:tip
+  > done
+  
+  # foo-%nof%N.patch
+  exporting patches:
+  foo-01of10.patch
+  foo-02of10.patch
+  foo-03of10.patch
+  foo-04of10.patch
+  foo-05of10.patch
+  foo-06of10.patch
+  foo-07of10.patch
+  foo-08of10.patch
+  foo-09of10.patch
+  foo-10of10.patch
+  
+  # foo-%%%H.patch
+  exporting patches:
+  foo-%617188a1c80f869a7b66c85134da88a6fb145f67.patch
+  foo-%dd41a5ff707a5225204105611ba49cc5c229d55f.patch
+  foo-%f95a5410f8664b6e1490a4af654e4b7d41a7b321.patch
+  foo-%4346bcfde53b4d9042489078bcfa9c3e28201db2.patch
+  foo-%afda8c3a009cc99449a05ad8aa4655648c4ecd34.patch
+  foo-%35284ce2b6b99c9d2ac66268fe99e68e1974e1aa.patch
+  foo-%9688c41894e6931305fa7165a37f6568050b4e9b.patch
+  foo-%747d3c68f8ec44bb35816bfcd59aeb50b9654c2f.patch
+  foo-%5f17a83f5fbd9414006a5e563eab4c8a00729efd.patch
+  foo-%f3acbafac161ec68f1598af38f794f28847ca5d3.patch
+  
+  # foo-%b-%R.patch
+  exporting patches:
+  foo-repo-2.patch
+  foo-repo-3.patch
+  foo-repo-4.patch
+  foo-repo-5.patch
+  foo-repo-6.patch
+  foo-repo-7.patch
+  foo-repo-8.patch
+  foo-repo-9.patch
+  foo-repo-10.patch
+  foo-repo-11.patch
+  
+  # foo-%h.patch
+  exporting patches:
+  foo-617188a1c80f.patch
+  foo-dd41a5ff707a.patch
+  foo-f95a5410f866.patch
+  foo-4346bcfde53b.patch
+  foo-afda8c3a009c.patch
+  foo-35284ce2b6b9.patch
+  foo-9688c41894e6.patch
+  foo-747d3c68f8ec.patch
+  foo-5f17a83f5fbd.patch
+  foo-f3acbafac161.patch
+  
+  # foo-%r.patch
+  exporting patches:
+  foo-02.patch
+  foo-03.patch
+  foo-04.patch
+  foo-05.patch
+  foo-06.patch
+  foo-07.patch
+  foo-08.patch
+  foo-09.patch
+  foo-10.patch
+  foo-11.patch
+
+Exporting 4 changesets to a file:
+
+  $ hg export -o export_internal 1 2 3 4
+  $ grep HG export_internal | wc -l | sed -e 's/^ *//'
+  4
+
+Exporting 4 changesets to a file:
+
+  $ hg export 1 2 3 4 | grep HG | wc -l | sed -e 's/^ *//'
+  4
+
+Exporting revision -2 to a file:
+
+  $ hg export -- -2
+  # HG changeset patch
+  # User test
+  # Date 0 0
+  # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
+  # Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
+  foo-10
+  
+  diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
+  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
+  @@ -8,3 +8,4 @@
+   foo-7
+   foo-8
+   foo-9
+  +foo-10
+
--- a/tests/test-hgrc	Thu Aug 26 16:32:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-echo "invalid" > $HGRCPATH
-hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
-echo "" > $HGRCPATH
-
-# issue1199: escaping
-hg init "foo%bar"
-hg clone "foo%bar" foobar
-p=`pwd`
-cd foobar
-cat .hg/hgrc | sed -e "s:$p:...:"
-hg paths | sed -e "s:$p:...:"
-hg showconfig | sed -e "s:$p:...:"
-cd ..
-
-# issue1829: wrong indentation
-echo '[foo]' > $HGRCPATH
-echo '  x = y' >> $HGRCPATH
-hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
-
-python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" \
-    > $HGRCPATH
-hg showconfig foo
-
-FAKEPATH=/path/to/nowhere
-export FAKEPATH
-echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
-hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
-unset FAKEPATH
-
-echo "% username expansion"
-olduser=$HGUSER
-unset HGUSER
-
-FAKEUSER='John Doe'
-export FAKEUSER
-echo '[ui]' > $HGRCPATH
-echo 'username = $FAKEUSER' >> $HGRCPATH
-
-hg init usertest
-cd usertest
-touch bar
-hg commit --addremove --quiet -m "added bar"
-hg log --template "{author}\n"
-cd ..
-
-hg showconfig | sed -e "s:$p:...:"
-
-unset FAKEUSER
-HGUSER=$olduser
-export HGUSER
-
-# HGPLAIN
-cd ..
-p=`pwd`
-echo "[ui]" > $HGRCPATH
-echo "debug=true" >> $HGRCPATH
-echo "fallbackencoding=ASCII" >> $HGRCPATH
-echo "quiet=true" >> $HGRCPATH
-echo "slash=true" >> $HGRCPATH
-echo "traceback=true" >> $HGRCPATH
-echo "verbose=true" >> $HGRCPATH
-echo "style=~/.hgstyle" >> $HGRCPATH
-echo "logtemplate={node}" >> $HGRCPATH
-echo "[defaults]" >> $HGRCPATH
-echo "identify=-n" >> $HGRCPATH
-echo "[alias]" >> $HGRCPATH
-echo "log=log -g" >> $HGRCPATH
-
-echo '% customized hgrc'
-hg showconfig | sed -e "s:$p:...:"
-
-echo '% plain hgrc'
-HGPLAIN=; export HGPLAIN
-hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"
--- a/tests/test-hgrc.out	Thu Aug 26 16:32:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-hg: parse error at $HGRCPATH:1: invalid
-updating to branch default
-0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-[paths]
-default = .../foo%bar
-default = .../foo%bar
-bundle.mainreporoot=.../foobar
-paths.default=.../foo%bar
-hg: parse error at $HGRCPATH:2:   x = y
-foo.bar=a\nb\nc\nde\nfg
-foo.baz=bif cb
-hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
-% username expansion
-John Doe
-ui.username=$FAKEUSER
-% customized hgrc
-read config from: .../.hgrc
-.../.hgrc:13: alias.log=log -g
-.../.hgrc:11: defaults.identify=-n
-.../.hgrc:2: ui.debug=true
-.../.hgrc:3: ui.fallbackencoding=ASCII
-.../.hgrc:4: ui.quiet=true
-.../.hgrc:5: ui.slash=true
-.../.hgrc:6: ui.traceback=true
-.../.hgrc:7: ui.verbose=true
-.../.hgrc:8: ui.style=~/.hgstyle
-.../.hgrc:9: ui.logtemplate={node}
-% plain hgrc
-read config from: .../.hgrc
-none: ui.traceback=True
-none: ui.verbose=False
-none: ui.debug=True
-none: ui.quiet=False
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hgrc.t	Wed Sep 01 10:13:55 2010 +0200
@@ -0,0 +1,110 @@
+  $ echo "invalid" > $HGRCPATH
+  $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+  hg: parse error at $HGRCPATH:1: invalid
+  $ echo "" > $HGRCPATH
+
+issue1199: escaping
+
+  $ hg init "foo%bar"
+  $ hg clone "foo%bar" foobar
+  updating to branch default
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ p=`pwd`
+  $ cd foobar
+  $ cat .hg/hgrc | sed -e "s:$p:...:"
+  [paths]
+  default = .../foo%bar
+  $ hg paths | sed -e "s:$p:...:"
+  default = .../foo%bar
+  $ hg showconfig | sed -e "s:$p:...:"
+  bundle.mainreporoot=.../foobar
+  paths.default=.../foo%bar
+  $ cd ..
+
+issue1829: wrong indentation
+
+  $ echo '[foo]' > $HGRCPATH
+  $ echo '  x = y' >> $HGRCPATH
+  $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+  hg: parse error at $HGRCPATH:2:   x = y
+
+  $ python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" \
+  > > $HGRCPATH
+  $ hg showconfig foo
+  foo.bar=a\nb\nc\nde\nfg
+  foo.baz=bif cb
+
+  $ FAKEPATH=/path/to/nowhere
+  $ export FAKEPATH
+  $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
+  $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+  hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
+  $ unset FAKEPATH
+
+username expansion
+
+  $ olduser=$HGUSER
+  $ unset HGUSER
+
+  $ FAKEUSER='John Doe'
+  $ export FAKEUSER
+  $ echo '[ui]' > $HGRCPATH
+  $ echo 'username = $FAKEUSER' >> $HGRCPATH
+
+  $ hg init usertest
+  $ cd usertest
+  $ touch bar
+  $ hg commit --addremove --quiet -m "added bar"
+  $ hg log --template "{author}\n"
+  John Doe
+  $ cd ..
+
+  $ hg showconfig | sed -e "s:$p:...:"
+  ui.username=$FAKEUSER
+
+  $ unset FAKEUSER
+  $ HGUSER=$olduser
+  $ export HGUSER
+
+HGPLAIN
+
+  $ cd ..
+  $ p=`pwd`
+  $ echo "[ui]" > $HGRCPATH
+  $ echo "debug=true" >> $HGRCPATH
+  $ echo "fallbackencoding=ASCII" >> $HGRCPATH
+  $ echo "quiet=true" >> $HGRCPATH
+  $ echo "slash=true" >> $HGRCPATH
+  $ echo "traceback=true" >> $HGRCPATH
+  $ echo "verbose=true" >> $HGRCPATH
+  $ echo "style=~/.hgstyle" >> $HGRCPATH
+  $ echo "logtemplate={node}" >> $HGRCPATH
+  $ echo "[defaults]" >> $HGRCPATH
+  $ echo "identify=-n" >> $HGRCPATH
+  $ echo "[alias]" >> $HGRCPATH
+  $ echo "log=log -g" >> $HGRCPATH
+
+customized hgrc
+
+  $ hg showconfig | sed -e "s:$p:...:"
+  read config from: .../.hgrc
+  .../.hgrc:13: alias.log=log -g
+  .../.hgrc:11: defaults.identify=-n
+  .../.hgrc:2: ui.debug=true
+  .../.hgrc:3: ui.fallbackencoding=ASCII
+  .../.hgrc:4: ui.quiet=true
+  .../.hgrc:5: ui.slash=true
+  .../.hgrc:6: ui.traceback=true
+  .../.hgrc:7: ui.verbose=true
+  .../.hgrc:8: ui.style=~/.hgstyle
+  .../.hgrc:9: ui.logtemplate={node}
+
+plain hgrc
+
+  $ HGPLAIN=; export HGPLAIN
+  $ hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"
+  read config from: .../.hgrc
+  none: ui.traceback=True
+  none: ui.verbose=False
+  none: ui.debug=True
+  none: ui.quiet=False
--- a/tests/test-hgwebdir	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-hgwebdir	Wed Sep 01 10:13:55 2010 +0200
@@ -26,6 +26,10 @@
 echo c > c/c
 hg --cwd c ci -Amc -d'3 0'
 
+# create repository without .hg/store
+hg init nostore
+rm -R nostore/.hg/store
+
 root=`pwd`
 cd ..
 
@@ -112,6 +116,20 @@
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
 
 
+"$TESTDIR/killdaemons.py"
+cat > paths.conf <<EOF
+[paths]
+nostore = $root/nostore
+inexistent = $root/inexistent
+EOF
+
+hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
+    -A access-paths.log -E error-paths-4.log
+cat hg.pid >> $DAEMON_PIDS
+echo % test inexistent and inaccessible repo should be ignored silently
+"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/'
+
+
 cat > collections.conf <<EOF
 [collections]
 $root=$root
--- a/tests/test-hgwebdir.out	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-hgwebdir.out	Wed Sep 01 10:13:55 2010 +0200
@@ -406,6 +406,45 @@
 /t/a/
 /t/b/
 
+% test inexistent and inaccessible repo should be ignored silently
+200 Script output follows
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<link rel="icon" href="/static/hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+
+<title>Mercurial repositories index</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<a href="http://mercurial.selenic.com/">
+<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
+</div>
+<div class="main">
+<h2>Mercurial Repositories</h2>
+
+<table class="bigtable">
+    <tr>
+        <th><a href="?sort=name">Name</a></th>
+        <th><a href="?sort=description">Description</a></th>
+        <th><a href="?sort=contact">Contact</a></th>
+        <th><a href="?sort=lastchange">Last modified</a></th>
+        <th>&nbsp;</th>
+    </tr>
+    
+</table>
+</div>
+</div>
+
+
+</body>
+</html>
+
 % collections: should succeed
 200 Script output follows
 
--- a/tests/test-log.out	Thu Aug 26 16:32:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,730 +0,0 @@
-adding a
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     a
-
-% -f, directory
-abort: cannot follow nonexistent file: "dir"
-% -f, but no args
-changeset:   4:66c1345dc4f9
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:05 1970 +0000
-summary:     e
-
-changeset:   3:7c6c671bb7cc
-user:        test
-date:        Thu Jan 01 00:00:04 1970 +0000
-summary:     d
-
-changeset:   2:41dd4284081e
-user:        test
-date:        Thu Jan 01 00:00:03 1970 +0000
-summary:     c
-
-changeset:   1:784de7cef101
-user:        test
-date:        Thu Jan 01 00:00:02 1970 +0000
-summary:     b
-
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     a
-
-% one rename
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-files:       a
-description:
-a
-
-
-% many renames
-changeset:   4:66c1345dc4f9
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:05 1970 +0000
-files:       dir/b e
-description:
-e
-
-
-changeset:   2:41dd4284081e
-user:        test
-date:        Thu Jan 01 00:00:03 1970 +0000
-files:       b dir/b
-description:
-c
-
-
-changeset:   1:784de7cef101
-user:        test
-date:        Thu Jan 01 00:00:02 1970 +0000
-files:       b
-description:
-b
-
-
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-files:       a
-description:
-a
-
-
-% log -pf dir/b
-changeset:   2:41dd4284081e
-user:        test
-date:        Thu Jan 01 00:00:03 1970 +0000
-summary:     c
-
-diff -r 784de7cef101 -r 41dd4284081e dir/b
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/dir/b	Thu Jan 01 00:00:03 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-changeset:   1:784de7cef101
-user:        test
-date:        Thu Jan 01 00:00:02 1970 +0000
-summary:     b
-
-diff -r 8580ff50825a -r 784de7cef101 b
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/b	Thu Jan 01 00:00:02 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     a
-
-diff -r 000000000000 -r 8580ff50825a a
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/a	Thu Jan 01 00:00:01 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-% log -vf dir/b
-changeset:   2:41dd4284081e
-user:        test
-date:        Thu Jan 01 00:00:03 1970 +0000
-files:       b dir/b
-description:
-c
-
-
-changeset:   1:784de7cef101
-user:        test
-date:        Thu Jan 01 00:00:02 1970 +0000
-files:       b
-description:
-b
-
-
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-files:       a
-description:
-a
-
-
-% log copies with --copies
-4 e (dir/b)
-3 b (a)
-2 dir/b (b)
-1 b (a)
-0 
-% log copies switch without --copies, with old filecopy template
-4 
-3 
-2 
-1 
-0 
-% log copies switch with --copies
-4 e (dir/b)
-3 b (a)
-2 dir/b (b)
-1 b (a)
-0 
-% log copies with hardcoded style and with --style=default
-changeset:   4:66c1345dc4f9
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:05 1970 +0000
-files:       dir/b e
-copies:      e (dir/b)
-description:
-e
-
-
-changeset:   4:66c1345dc4f9
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:05 1970 +0000
-files:       dir/b e
-copies:      e (dir/b)
-description:
-e
-
-
-% log copies, non-linear manifest
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding foo
-created new head
-5 e (dir/b)
-% log copies, execute bit set
-6 
-% log -p d
-changeset:   3:7c6c671bb7cc
-user:        test
-date:        Thu Jan 01 00:00:04 1970 +0000
-files:       a b d
-description:
-d
-
-
-diff -r 41dd4284081e -r 7c6c671bb7cc d
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/d	Thu Jan 01 00:00:04 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-% log --removed file
-changeset:   3:7c6c671bb7cc
-user:        test
-date:        Thu Jan 01 00:00:04 1970 +0000
-files:       a b d
-description:
-d
-
-
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-files:       a
-description:
-a
-
-
-% log --removed revrange file
-changeset:   0:8580ff50825a
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-files:       a
-description:
-a
-
-
-adding base
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-adding b1
-created new head
-% log -f
-changeset:   3:e62f78d544b4
-tag:         tip
-parent:      1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1
-
-changeset:   1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     r1
-
-changeset:   0:67e992f2c4f3
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     base
-
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding b2
-created new head
-% log -f -r 1:tip
-changeset:   1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     r1
-
-changeset:   2:60c670bf5b30
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     r2
-
-changeset:   3:e62f78d544b4
-parent:      1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1
-
-2 files updated, 0 files merged, 1 files removed, 0 files unresolved
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-% log -r . with two parents
-changeset:   3:e62f78d544b4
-parent:      1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1
-
-% log -r . with one parent
-changeset:   5:302e9dd6890d
-tag:         tip
-parent:      3:e62f78d544b4
-parent:      4:ddb82e70d1a1
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     m12
-
-% log --follow-first
-changeset:   6:2404bbcab562
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1.1
-
-changeset:   5:302e9dd6890d
-parent:      3:e62f78d544b4
-parent:      4:ddb82e70d1a1
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     m12
-
-changeset:   3:e62f78d544b4
-parent:      1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1
-
-changeset:   1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     r1
-
-changeset:   0:67e992f2c4f3
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     base
-
-% log -P 2
-changeset:   6:2404bbcab562
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1.1
-
-changeset:   5:302e9dd6890d
-parent:      3:e62f78d544b4
-parent:      4:ddb82e70d1a1
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     m12
-
-changeset:   4:ddb82e70d1a1
-parent:      0:67e992f2c4f3
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b2
-
-changeset:   3:e62f78d544b4
-parent:      1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1
-
-% log -r tip -p --git
-changeset:   6:2404bbcab562
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1.1
-
-diff --git a/b1 b/b1
---- a/b1
-+++ b/b1
-@@ -1,1 +1,2 @@
- b1
-+postm
-
-% log -r ""
-hg: parse error: empty query
-% log -r <some unknown node id>
-abort: unknown revision '1000000000000000000000000000000000000000'!
-% log -k r1
-changeset:   1:3d5bf5654eda
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     r1
-
-% log -d -1
-% log -p -l2 --color=always
-changeset:   6:2404bbcab562
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1.1
-
-diff -r 302e9dd6890d -r 2404bbcab562 b1
---- a/b1	Thu Jan 01 00:00:01 1970 +0000
-+++ b/b1	Thu Jan 01 00:00:01 1970 +0000
-@@ -1,1 +1,2 @@
- b1
-+postm
-
-changeset:   5:302e9dd6890d
-parent:      3:e62f78d544b4
-parent:      4:ddb82e70d1a1
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     m12
-
-diff -r e62f78d544b4 -r 302e9dd6890d b2
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/b2	Thu Jan 01 00:00:01 1970 +0000
-@@ -0,0 +1,1 @@
-+b2
-
-% log -r tip --stat
-changeset:   6:2404bbcab562
-tag:         tip
-user:        test
-date:        Thu Jan 01 00:00:01 1970 +0000
-summary:     b1.1
-
- b1 |  1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-adding a
-adding b
-changeset:   0:29a4c94f1924
-user:        User One <user1@example.org>
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     a
-
-changeset:   1:e834b5e69c0e
-tag:         tip
-user:        User Two <user2@example.org>
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     b
-
-changeset:   0:29a4c94f1924
-user:        User One <user1@example.org>
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     a
-
-adding a
-marked working directory as branch test
-adding b
-0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding c
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding c
-% log -b default
-changeset:   2:c3a4f03cc9a7
-parent:      0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-% log -b test
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-% log -b dummy
-abort: unknown revision 'dummy'!
-% log -b .
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-% log -b default -b test
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   2:c3a4f03cc9a7
-parent:      0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-% log -b default -b .
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   2:c3a4f03cc9a7
-parent:      0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-% log -b . -b test
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-% log -b 2
-changeset:   2:c3a4f03cc9a7
-parent:      0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-% log -p --cwd dir (in subdir)
-changeset:   3:f5d8de11c2e2
-branch:      test
-tag:         tip
-parent:      1:d32277701ccb
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-diff -r d32277701ccb -r f5d8de11c2e2 c
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/c	Thu Jan 01 00:00:00 1970 +0000
-@@ -0,0 +1,1 @@
-+c
-
-changeset:   2:c3a4f03cc9a7
-parent:      0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-diff -r 24427303d56f -r c3a4f03cc9a7 c
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/c	Thu Jan 01 00:00:00 1970 +0000
-@@ -0,0 +1,1 @@
-+c
-
-changeset:   1:d32277701ccb
-branch:      test
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on test
-
-diff -r 24427303d56f -r d32277701ccb b
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/b	Thu Jan 01 00:00:00 1970 +0000
-@@ -0,0 +1,1 @@
-+b
-
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-diff -r 000000000000 -r 24427303d56f a
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/a	Thu Jan 01 00:00:00 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-% log -p -R repo
-changeset:   0:24427303d56f
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     commit on default
-
-diff -r 000000000000 -r 24427303d56f a
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/a	Thu Jan 01 00:00:00 1970 +0000
-@@ -0,0 +1,1 @@
-+a
-
-adding init
-adding foo
-adding foo
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding branch
-created new head
-adding foo
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-created new head
-merging foo
-warning: conflicts during merge.
-merging foo failed!
-0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
-merging foo
-warning: conflicts during merge.
-merging foo failed!
-1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
-@    changeset:   10:4dae8563d2c5
-|\   tag:         tip
-| |  parent:      9:7b35701b003e
-| |  parent:      4:88176d361b69
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     Last merge, related
-| |
-| o    changeset:   9:7b35701b003e
-| |\   parent:      8:e5416ad8a855
-| | |  parent:      7:87fe3144dcfa
-| | |  user:        test
-| | |  date:        Thu Jan 01 00:00:00 1970 +0000
-| | |  summary:     First merge, related
-| | |
-| | o  changeset:   8:e5416ad8a855
-| | |  parent:      6:dc6c325fe5ee
-| | |  user:        test
-| | |  date:        Thu Jan 01 00:00:00 1970 +0000
-| | |  summary:     change foo in branch, related
-| | |
-| o |  changeset:   7:87fe3144dcfa
-| |/   user:        test
-| |    date:        Thu Jan 01 00:00:00 1970 +0000
-| |    summary:     change foo, related
-| |
-| o  changeset:   6:dc6c325fe5ee
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     create foo, related
-| |
-| o  changeset:   5:73db34516eb9
-| |  parent:      0:e87515fd044a
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     first branch, unrelated
-| |
-o |  changeset:   4:88176d361b69
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     add foo, related
-| |
-o |  changeset:   3:dd78ae4afb56
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     delete foo, unrelated
-| |
-o |  changeset:   2:c4c64aedf0f7
-| |  user:        test
-| |  date:        Thu Jan 01 00:00:00 1970 +0000
-| |  summary:     add unrelated old foo
-| |
-o |  changeset:   1:e5faa7440653
-|/   user:        test
-|    date:        Thu Jan 01 00:00:00 1970 +0000
-|    summary:     change, unrelated
-|
-o  changeset:   0:e87515fd044a
-   user:        test
-   date:        Thu Jan 01 00:00:00 1970 +0000
-   summary:     init, unrelated
-
-changeset:   10:4dae8563d2c5
-tag:         tip
-parent:      9:7b35701b003e
-parent:      4:88176d361b69
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     Last merge, related
-
-changeset:   9:7b35701b003e
-parent:      8:e5416ad8a855
-parent:      7:87fe3144dcfa
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     First merge, related
-
-changeset:   8:e5416ad8a855
-parent:      6:dc6c325fe5ee
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     change foo in branch, related
-
-changeset:   7:87fe3144dcfa
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     change foo, related
-
-changeset:   6:dc6c325fe5ee
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     create foo, related
-
-changeset:   4:88176d361b69
-user:        test
-date:        Thu Jan 01 00:00:00 1970 +0000
-summary:     add foo, related
-
--- a/tests/test-mq.t	Thu Aug 26 16:32:12 2010 +0200
+++ b/tests/test-mq.t	Wed Sep 01 10:13:55 2010 +0200
@@ -170,6 +170,10 @@
   A
   B
 
+add an untracked file
+
+  $ echo >> .hg/patches/flaf
+
 status --mq with color (issue2096)
 
   $ hg status --mq --config extensions.color= --color=always
@@ -177,9 +181,15 @@
   A A
   A B
   A series
+  ? flaf
+
+try the --mq option on a command provided by an extension
+
+  $ hg purge --mq --verbose --config extensions.purge=
+  Removing file flaf
+
   $ cd ..
 
-
 init --mq without repo
 
   $ mkdir f