merge with i18n stable
authorAugie Fackler <augie@google.com>
Wed, 01 Nov 2017 16:07:33 -0400
branchstable
changeset 34950 cffc8a22ce0c
parent 34948 ff178743e59b (diff)
parent 34949 f432e2064a74 (current diff)
child 34951 fb7f58daca48
merge with i18n
i18n/pt_BR.po
--- a/Makefile	Wed Nov 01 08:31:16 2017 -0200
+++ b/Makefile	Wed Nov 01 16:07:33 2017 -0400
@@ -308,7 +308,7 @@
 
 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
 	install-doc install-home install-home-bin install-home-doc \
-	dist dist-notests check tests check-code update-pot \
+	dist dist-notests check tests check-code format-c update-pot \
 	osx deb ppa docker-debian-jessie docker-debian-stretch \
 	docker-ubuntu-trusty docker-ubuntu-trusty-ppa \
 	docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
--- a/contrib/macosx/Readme.html	Wed Nov 01 08:31:16 2017 -0200
+++ b/contrib/macosx/Readme.html	Wed Nov 01 16:07:33 2017 -0400
@@ -27,7 +27,7 @@
 <p class="p2"><br></p>
 <p class="p3">Visit the <a href="https://mercurial-scm.org/">Mercurial web site and wiki</a></p>
 <p class="p2"><br></p>
-<p class="p3">There's also a free book, <a href="http://hgbook.red-bean.com/">Distributed revision control with Mercurial</a></p>
+<p class="p3">There's also a free book, <a href="https://book.mercurial-scm.org/">Distributed revision control with Mercurial</a></p>
 <p class="p2"><br></p>
 <p class="p1"><b>Reporting problems</b></p>
 <p class="p2"><br></p>
--- a/contrib/win32/ReadMe.html	Wed Nov 01 08:31:16 2017 -0200
+++ b/contrib/win32/ReadMe.html	Wed Nov 01 16:07:33 2017 -0400
@@ -51,7 +51,7 @@
       For documentation, please visit the <a
       href="https://mercurial-scm.org/">Mercurial web site</a>.
       You can also download a free book, <a
-      href="http://hgbook.red-bean.com/">Mercurial: The Definitive
+      href="https://book.mercurial-scm.org/">Mercurial: The Definitive
       Guide</a>.
     </p>
 
--- a/contrib/wix/help.wxs	Wed Nov 01 08:31:16 2017 -0200
+++ b/contrib/wix/help.wxs	Wed Nov 01 16:07:33 2017 -0400
@@ -42,6 +42,7 @@
             <File Id="internals.bundles.txt"      Name="bundles.txt" KeyPath="yes" />
             <File Id="internals.censor.txt"       Name="censor.txt" />
             <File Id="internals.changegroups.txt" Name="changegroups.txt" />
+            <File Id="internals.config.txt"       Name="config.txt" />
             <File Id="internals.requirements.txt" Name="requirements.txt" />
             <File Id="internals.revlogs.txt"      Name="revlogs.txt" />
             <File Id="internals.wireprotocol.txt" Name="wireprotocol.txt" />
--- a/hgext/bugzilla.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/bugzilla.py	Wed Nov 01 16:07:33 2017 -0400
@@ -301,7 +301,6 @@
 from mercurial.node import short
 from mercurial import (
     cmdutil,
-    configitems,
     error,
     mail,
     registrar,
@@ -354,7 +353,7 @@
     default='localhost',
 )
 configitem('bugzilla', 'notify',
-    default=configitems.dynamicdefault,
+    default=configitem.dynamicdefault,
 )
 configitem('bugzilla', 'password',
     default=None,
--- a/hgext/children.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/children.py	Wed Nov 01 16:07:33 2017 -0400
@@ -49,7 +49,7 @@
 
     Please use :hg:`log` instead::
 
-        hg children => hg log -r "children()"
+        hg children => hg log -r "children(.)"
         hg children -r REV => hg log -r "children(REV)"
 
     See :hg:`help log` and :hg:`help revsets.children`.
--- a/hgext/histedit.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/histedit.py	Wed Nov 01 16:07:33 2017 -0400
@@ -190,7 +190,6 @@
 from mercurial import (
     bundle2,
     cmdutil,
-    configitems,
     context,
     copies,
     destutil,
@@ -221,7 +220,7 @@
     default=False,
 )
 configitem('histedit', 'defaultrev',
-    default=configitems.dynamicdefault,
+    default=configitem.dynamicdefault,
 )
 configitem('histedit', 'dropmissing',
     default=False,
--- a/hgext/largefiles/__init__.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/largefiles/__init__.py	Wed Nov 01 16:07:33 2017 -0400
@@ -107,7 +107,6 @@
 from __future__ import absolute_import
 
 from mercurial import (
-    configitems,
     hg,
     localrepo,
     registrar,
@@ -131,7 +130,7 @@
 configitem = registrar.configitem(configtable)
 
 configitem('largefiles', 'minsize',
-    default=configitems.dynamicdefault,
+    default=configitem.dynamicdefault,
 )
 configitem('largefiles', 'patterns',
     default=list,
--- a/hgext/mq.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/mq.py	Wed Nov 01 16:07:33 2017 -0400
@@ -1963,6 +1963,14 @@
 
     def qrepo(self, create=False):
         ui = self.baseui.copy()
+        # copy back attributes set by ui.pager()
+        if self.ui.pageractive and not ui.pageractive:
+            ui.pageractive = self.ui.pageractive
+            # internal config: ui.formatted
+            ui.setconfig('ui', 'formatted',
+                         self.ui.config('ui', 'formatted'), 'mqpager')
+            ui.setconfig('ui', 'interactive',
+                         self.ui.config('ui', 'interactive'), 'mqpager')
         if create or os.path.isdir(self.join(".hg")):
             return hg.repository(ui, path=self.path, create=create)
 
--- a/hgext/share.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/hgext/share.py	Wed Nov 01 16:07:33 2017 -0400
@@ -34,7 +34,7 @@
     requested in the :hg:`clone` command matches exactly to a repository
     that was cloned before.
 
-    The default naming mode is "identity."
+    The default naming mode is "identity".
 '''
 
 from __future__ import absolute_import
--- a/i18n/ja.po	Wed Nov 01 08:31:16 2017 -0200
+++ b/i18n/ja.po	Wed Nov 01 16:07:33 2017 -0400
@@ -16535,8 +16535,8 @@
 msgid "for example: hg update \".::\""
 msgstr "指定例: hg update \".::\""
 
-msgid "can only specify one of -C/--clean, -c/--check, or -m/merge"
-msgstr "-C/--clean, -c/--check および -m/merge は複数指定できません"
+msgid "can only specify one of -C/--clean, -c/--check, or -m/--merge"
+msgstr "-C/--clean, -c/--check および -m/--merge は複数指定できません"
 
 msgid "verify the integrity of the repository"
 msgstr "リポジトリの整合性検証"
--- a/i18n/pt_BR.po	Wed Nov 01 08:31:16 2017 -0200
+++ b/i18n/pt_BR.po	Wed Nov 01 16:07:33 2017 -0400
@@ -18007,9 +18007,9 @@
 msgid "for example: hg update \".::\""
 msgstr "por exemplo: hg update \".::\""
 
-msgid "can only specify one of -C/--clean, -c/--check, or -m/merge"
-msgstr ""
-"só se pode especificar uma opção dentre -C/--clean, -c/--check ou -m/merge"
+msgid "can only specify one of -C/--clean, -c/--check, or -m/--merge"
+msgstr ""
+"só se pode especificar uma opção dentre -C/--clean, -c/--check ou -m/--merge"
 
 msgid "verify the integrity of the repository"
 msgstr "verifica a integridade do repositório"
--- a/mercurial/cmdutil.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/cmdutil.py	Wed Nov 01 16:07:33 2017 -0400
@@ -404,11 +404,6 @@
 
     return commit(ui, repo, recordinwlock, pats, opts)
 
-
-# extracted at module level as it's required each time a file will be added
-# to dirnode class object below
-pathsep = pycompat.ossep
-
 class dirnode(object):
     """
     Represent a directory in user working copy with information required for
@@ -446,8 +441,8 @@
 
         # the filename contains a path separator, it means it's not the direct
         # child of this directory
-        if pathsep in filename:
-            subdir, filep = filename.split(pathsep, 1)
+        if '/' in filename:
+            subdir, filep = filename.split('/', 1)
 
             # does the dirnode object for subdir exists
             if subdir not in self.subdirs:
--- a/mercurial/commands.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/commands.py	Wed Nov 01 16:07:33 2017 -0400
@@ -2072,7 +2072,7 @@
       (grafted from CHANGESETHASH)
 
     If --force is specified, revisions will be grafted even if they
-    are already ancestors of or have been grafted to the destination.
+    are already ancestors of, or have been grafted to, the destination.
     This is useful when the revisions have since been backed out.
 
     If a graft merge results in conflicts, the graft process is
@@ -3075,7 +3075,7 @@
 
     Show new changesets found in the specified path/URL or the default
     pull location. These are the changesets that would have been pulled
-    if a pull at the time you issued this command.
+    by :hg:`pull` at the time you issued this command.
 
     See pull for valid source format details.
 
@@ -3808,8 +3808,8 @@
     With one of -p/--public, -d/--draft or -s/--secret, change the
     phase value of the specified revisions.
 
-    Unless -f/--force is specified, :hg:`phase` won't move changeset from a
-    lower phase to an higher phase. Phases are ordered as follows::
+    Unless -f/--force is specified, :hg:`phase` won't move changesets from a
+    lower phase to a higher phase. Phases are ordered as follows::
 
         public < draft < secret
 
@@ -4787,9 +4787,9 @@
       for 'added', 'r' for 'removed', 'd' for 'deleted', 'u' for 'unknown', 'i'
       for 'ignored' and 'c' for clean.
 
-      It abbreviates only those statuses which are passed. Note that ignored
-      files are not displayed with '--terse i' unless the -i/--ignored option is
-      also used.
+      It abbreviates only those statuses which are passed. Note that clean and
+      ignored files are not displayed with '--terse ic' unless the -c/--clean
+      and -i/--ignored options are also used.
 
       The -v/--verbose option shows information when the repository is in an
       unfinished merge, shelve, rebase state etc. You can have this behavior
@@ -5489,7 +5489,7 @@
 
     if len([x for x in (clean, check, merge) if x]) > 1:
         raise error.Abort(_("can only specify one of -C/--clean, -c/--check, "
-                            "or -m/merge"))
+                            "or -m/--merge"))
 
     updatecheck = None
     if check:
--- a/mercurial/configitems.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/configitems.py	Wed Nov 01 16:07:33 2017 -0400
@@ -106,7 +106,10 @@
 # Registering actual config items
 
 def getitemregister(configtable):
-    return functools.partial(_register, configtable)
+    f = functools.partial(_register, configtable)
+    # export pseudo enum as configitem.*
+    f.dynamicdefault = dynamicdefault
+    return f
 
 coreconfigitem = getitemregister(coreitems)
 
@@ -575,6 +578,9 @@
 coreconfigitem('merge', 'checkignored',
     default='abort',
 )
+coreconfigitem('experimental', 'merge.checkpathconflicts',
+    default=False,
+)
 coreconfigitem('merge', 'followcopies',
     default=True,
 )
@@ -848,6 +854,9 @@
 coreconfigitem('ui', 'debugger',
     default=None,
 )
+coreconfigitem('ui', 'editor',
+    default=dynamicdefault,
+)
 coreconfigitem('ui', 'fallbackencoding',
     default=None,
 )
--- a/mercurial/context.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/context.py	Wed Nov 01 16:07:33 2017 -0400
@@ -471,7 +471,8 @@
                 self._node = repo.changelog.tip()
                 self._rev = repo.changelog.rev(self._node)
                 return
-            if changeid == '.' or changeid == repo.dirstate.p1():
+            if (changeid == '.'
+                or repo.local() and changeid == repo.dirstate.p1()):
                 # this is a hack to delay/avoid loading obsmarkers
                 # when we know that '.' won't be hidden
                 self._node = repo.dirstate.p1()
@@ -536,7 +537,8 @@
             #
             # XXX we could avoid the unfiltered if we had a recognizable
             # exception for filtered changeset access
-            if changeid in repo.unfiltered().dirstate.parents():
+            if (repo.local()
+                and changeid in repo.unfiltered().dirstate.parents()):
                 msg = _("working directory has unknown parent '%s'!")
                 raise error.Abort(msg % short(changeid))
             try:
--- a/mercurial/dirstate.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/dirstate.py	Wed Nov 01 16:07:33 2017 -0400
@@ -129,7 +129,7 @@
     def _map(self):
         '''Return the dirstate contents as a map from filename to
         (state, mode, size, time).'''
-        self._read()
+        self._map = dirstatemap(self._ui, self._opener, self._root)
         return self._map
 
     @property
@@ -353,10 +353,6 @@
             f.discard()
             raise
 
-    def _read(self):
-        self._map = dirstatemap(self._ui, self._opener, self._root)
-        self._map.read()
-
     def invalidate(self):
         '''Causes the next access to reread the dirstate.
 
@@ -593,8 +589,7 @@
         return path
 
     def clear(self):
-        self._map = dirstatemap(self._ui, self._opener, self._root)
-        self._map.setparents(nullid, nullid)
+        self._map.clear()
         self._lastnormaltime = 0
         self._updatedfiles.clear()
         self._dirty = True
@@ -1058,6 +1053,9 @@
         removed, deleted, clean = [], [], []
 
         dmap = self._map
+        dmap.preload()
+        dcontains = dmap.__contains__
+        dget = dmap.__getitem__
         ladd = lookup.append            # aka "unsure"
         madd = modified.append
         aadd = added.append
@@ -1079,7 +1077,7 @@
         full = listclean or match.traversedir is not None
         for fn, st in self.walk(match, subrepos, listunknown, listignored,
                                 full=full).iteritems():
-            if fn not in dmap:
+            if not dcontains(fn):
                 if (listignored or mexact(fn)) and dirignore(fn):
                     if listignored:
                         iadd(fn)
@@ -1094,7 +1092,7 @@
             # a list, but falls back to creating a full-fledged iterator in
             # general. That is much slower than simply accessing and storing the
             # tuple members one by one.
-            t = dmap[fn]
+            t = dget(fn)
             state = t[0]
             mode = t[1]
             size = t[2]
@@ -1189,7 +1187,11 @@
         # changes of dirstate out after restoring from backup file
         self.invalidate()
         filename = self._actualfilename(tr)
-        self._opener.rename(backupname, filename, checkambig=True)
+        o = self._opener
+        if util.samefile(o.join(backupname), o.join(filename)):
+            o.unlink(backupname)
+        else:
+            o.rename(backupname, filename, checkambig=True)
 
     def clearbackup(self, tr, backupname):
         '''Clear backup file'''
@@ -1202,14 +1204,29 @@
         self._root = root
         self._filename = 'dirstate'
 
-        self._map = {}
-        self.copymap = {}
         self._parents = None
         self._dirtyparents = False
 
         # for consistent view between _pl() and _read() invocations
         self._pendingmode = None
 
+    @propertycache
+    def _map(self):
+        self._map = {}
+        self.read()
+        return self._map
+
+    @propertycache
+    def copymap(self):
+        self.copymap = {}
+        self._map
+        return self.copymap
+
+    def clear(self):
+        self._map.clear()
+        self.copymap.clear()
+        self.setparents(nullid, nullid)
+
     def iteritems(self):
         return self._map.iteritems()
 
@@ -1237,6 +1254,10 @@
     def keys(self):
         return self._map.keys()
 
+    def preload(self):
+        """Loads the underlying data, if it's not already loaded"""
+        self._map
+
     def nonnormalentries(self):
         '''Compute the nonnormal dirstate entries from the dmap'''
         try:
@@ -1363,6 +1384,13 @@
         if not self._dirtyparents:
             self.setparents(*p)
 
+        # Avoid excess attribute lookups by fast pathing certain checks
+        self.__contains__ = self._map.__contains__
+        self.__getitem__ = self._map.__getitem__
+        self.__setitem__ = self._map.__setitem__
+        self.__delitem__ = self._map.__delitem__
+        self.get = self._map.get
+
     def write(self, st, now):
         st.write(parsers.pack_dirstate(self._map, self.copymap,
                                        self.parents(), now))
@@ -1384,7 +1412,7 @@
 
     @propertycache
     def identity(self):
-        self.read()
+        self._map
         return self.identity
 
     @propertycache
--- a/mercurial/filemerge.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/filemerge.py	Wed Nov 01 16:07:33 2017 -0400
@@ -116,7 +116,7 @@
             continue
         p = util.lookupreg(k, _toolstr(ui, tool, "regname"))
         if p:
-            p = util.findexe(p + _toolstr(ui, tool, "regappend"))
+            p = util.findexe(p + _toolstr(ui, tool, "regappend", ""))
             if p:
                 return p
     exe = _toolstr(ui, tool, "executable", tool)
--- a/mercurial/help.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help.py	Wed Nov 01 16:07:33 2017 -0400
@@ -202,6 +202,8 @@
      loaddoc('censor', subdir='internals')),
     (['changegroups'], _('Changegroups'),
      loaddoc('changegroups', subdir='internals')),
+    (['config'], _('Config Register'),
+     loaddoc('config', subdir='internals')),
     (['requirements'], _('Repository Requirements'),
      loaddoc('requirements', subdir='internals')),
     (['revlogs'], _('Revision Logs'),
--- a/mercurial/help/config.txt	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help/config.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -1006,12 +1006,14 @@
   Run right before a phase change is actually finalized. Any repository change
   will be visible to the hook program. This lets you validate the transaction
   content or change it. Exit status 0 allows the commit to proceed.  A non-zero
-  status will cause the transaction to be rolled back.
+  status will cause the transaction to be rolled back. The hook is called
+  multiple times, once for each revision affected by a phase change.
   The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE``
   while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE``
   will be empty.  In addition, the reason for the transaction opening will be in
   ``$HG_TXNNAME``, and a unique identifier for the transaction will be in
-  ``HG_TXNID``.
+  ``HG_TXNID``. The hook is also run for newly added revisions. In this case
+  the ``$HG_OLDPHASE`` entry will be empty.
 
 ``txnclose``
   Run after any repository transaction has been committed. At this
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/internals/config.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -0,0 +1,108 @@
+All config options used within Mercurial should be registered.
+
+Config Option in Core
+=====================
+
+Config options used by Mercurial core are registered in the
+``mercurial.configitems`` module.
+
+Simple entry
+------------
+
+A registration entry typically looks like::
+
+    coreconfigitem('section', 'option',
+        default=MyDefaultValue,
+    )
+
+Once registered, Mercurial will know that ``section.option`` is a legitimate
+config option and that ``MyDefaultValue`` should be used if no other values are
+defined in configuration files.
+
+Complex default value
+---------------------
+
+If the default provided is a callable, it is called to retrieve the default
+value when accessing the config option. This is useful for default values that
+are mutable like the empty list::
+
+    coreconfigitem('pager', 'ignore',
+        default=list,
+    )
+
+In addition, there are cases where the default is not fixed, but computed from
+other properties. In this case, use the ``dynamicdefault`` object as the value
+for the ``default`` parameter. A default value is then explicitly required when
+reading the option::
+
+    # registration
+    coreconfigitem('web', 'name',
+        default=dynamicdefault,
+    )
+
+    # usage
+    ui.config('web', 'name', dirname)
+
+Free form options
+-----------------
+
+Some config sections use free form options (e.g. ``paths``). You can register
+them using the ``generic`` parameters::
+
+    coreconfigitem('paths', '.*',
+        default=None,
+        generic=True,
+    )
+
+When ``generic=True`` is set, the option name is matched as a regular expression
+(rooted to string start). It can be used to select specific sub parameters::
+
+    coreconfigitem('merge-tools', br'.*\.args$',
+        default="$local $base $other",
+        generic=True,
+        priority=-1,
+    )
+
+The ``priority`` parameter controls the order used to match the generic pattern
+(lower first).
+
+Config Option in Extensions
+===========================
+
+General case
+------------
+
+Extensions should register config items through the ``registrar`` API (also used
+for commands and others)::
+
+    configtable = {}
+    configitem = registrar.configitem(configtable)
+
+    configitem('blackbox', 'dirty',
+        default=False,
+    )
+
+The ``dynamicdefault`` object is then available as
+``configitem.dynamicdefault``.
+
+Supporting older versions
+-------------------------
+
+The registry was introduced in Mercurial 4.3, and the ``generic`` parameter was
+introduced in 4.4. Starting with Mercurial 4.4, all core options were registered
+and developer warnings are emitted when accessing unregistered option.
+
+Extensions supporting versions older than Mercurial 4.3 cannot rely on the
+default value being registered. The simplest way to register an option while
+still supporting an older version is to use ``dynamicdefault`` for options
+requiring a default value. The existing code passing an explicit default can
+then stay in use until compatibility with Mercurial 4.2 is dropped.
+
+As reminder, here are the default values for each config type:
+- config:      None
+- configbool:  False
+- configbytes: 0
+- configdate:  None
+- configint:   None
+- configlist:  []
+- configpath:  None
--- a/mercurial/help/internals/wireprotocol.txt	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help/internals/wireprotocol.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -731,6 +731,8 @@
 cbattempted
    Boolean indicating whether the client attempted to use the *clone bundles*
    feature before performing this request.
+phases
+   Boolean indicating whether phases data is requested.
 
 The return type on success is a ``stream`` where the value is bundle.
 On the HTTP transport, the response is zlib compressed.
--- a/mercurial/help/merge-tools.txt	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help/merge-tools.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -76,7 +76,7 @@
 
    After selecting a merge program, Mercurial will by default attempt
    to merge the files using a simple merge algorithm first. Only if it doesn't
-   succeed because of conflicting changes Mercurial will actually execute the
+   succeed because of conflicting changes will Mercurial actually execute the
    merge program. Whether to use the simple merge algorithm first can be
    controlled by the premerge setting of the merge tool. Premerge is enabled by
    default unless the file is binary or a symlink.
--- a/mercurial/help/phases.txt	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help/phases.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -28,7 +28,7 @@
 Phases can also be manually manipulated with the :hg:`phase` command
 if needed. See :hg:`help -v phase` for examples.
 
-To make yours commits secret by default, put this in your
+To make your commits secret by default, put this in your
 configuration file::
 
   [phases]
@@ -89,7 +89,7 @@
 
      hg phase --force --draft .
 
- - show a list of changeset revision and phase::
+ - show a list of changeset revisions and each corresponding phase::
 
      hg log --template "{rev} {phase}\n"
 
--- a/mercurial/help/revisions.txt	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/help/revisions.txt	Wed Nov 01 16:07:33 2017 -0400
@@ -134,7 +134,7 @@
 prefixed with ``(?i)``.
 
 For example, ``tag(r're:(?i)release')`` matches "release" or "RELEASE"
-or "Release", etc
+or "Release", etc.
 
 Predicates
 ==========
@@ -212,7 +212,7 @@
 
     hg log -r "(keyword(bug) or keyword(issue)) and not ancestors(tag())"
 
-- Update to commit that bookmark @ is pointing too, without activating the
+- Update to the commit that bookmark @ is pointing to, without activating the
   bookmark (this works because the last revision of the revset is used)::
 
     hg update :@
--- a/mercurial/merge.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/merge.py	Wed Nov 01 16:07:33 2017 -0400
@@ -693,6 +693,7 @@
     abortconflicts = set()
     unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
     ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
+    pathconfig = repo.ui.configbool('experimental', 'merge.checkpathconflicts')
     if not force:
         def collectconflicts(conflicts, config):
             if config == 'abort':
@@ -704,7 +705,7 @@
             if m in ('c', 'dc'):
                 if _checkunknownfile(repo, wctx, mctx, f):
                     fileconflicts.add(f)
-                elif f not in wctx:
+                elif pathconfig and f not in wctx:
                     path = _checkunknowndirs(repo, f)
                     if path is not None:
                         pathconflicts.add(path)
@@ -1139,8 +1140,9 @@
                     actions[f] = ('dc', (None, f, f, False, pa.node()),
                                   "prompt deleted/changed")
 
-    # If we are merging, look for path conflicts.
-    checkpathconflicts(repo, wctx, p2, actions)
+    if repo.ui.configbool('experimental', 'merge.checkpathconflicts'):
+        # If we are merging, look for path conflicts.
+        checkpathconflicts(repo, wctx, p2, actions)
 
     return actions, diverge, renamedelete
 
@@ -1727,11 +1729,11 @@
     mergeforce = whether the merge was run with 'merge --force' (deprecated): if
       this is True, then 'force' should be True as well.
 
-    The table below shows all the behaviors of the update command
-    given the -c and -C or no options, whether the working directory
-    is dirty, whether a revision is specified, and the relationship of
-    the parent rev to the target rev (linear or not). Match from top first. The
-    -n option doesn't exist on the command line, but represents the
+    The table below shows all the behaviors of the update command given the
+    -c/--check and -C/--clean or no options, whether the working directory is
+    dirty, whether a revision is specified, and the relationship of the parent
+    rev to the target rev (linear or not). Match from top first. The -n
+    option doesn't exist on the command line, but represents the
     experimental.updatecheck=noconflict option.
 
     This logic is tested by test-update-branches.t.
--- a/mercurial/server.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/server.py	Wed Nov 01 16:07:33 2017 -0400
@@ -93,7 +93,8 @@
         nullfd = os.open(os.devnull, os.O_RDWR)
         logfilefd = nullfd
         if logfile:
-            logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND)
+            logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND,
+                                0o666)
         os.dup2(nullfd, 0)
         os.dup2(logfilefd, 1)
         os.dup2(logfilefd, 2)
--- a/mercurial/statichttprepo.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/statichttprepo.py	Wed Nov 01 16:07:33 2017 -0400
@@ -10,7 +10,6 @@
 from __future__ import absolute_import
 
 import errno
-import os
 
 from .i18n import _
 from . import (
@@ -20,6 +19,7 @@
     localrepo,
     manifest,
     namespaces,
+    pathutil,
     scmutil,
     store,
     url,
@@ -99,7 +99,7 @@
 
         def join(self, path):
             if path:
-                return os.path.join(self.base, path)
+                return pathutil.join(self.base, path)
             else:
                 return self.base
 
--- a/mercurial/ui.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/mercurial/ui.py	Wed Nov 01 16:07:33 2017 -0400
@@ -471,12 +471,16 @@
         return value
 
     def _config(self, section, name, default=_unset, untrusted=False):
-        value = default
+        value = itemdefault = default
         item = self._knownconfig.get(section, {}).get(name)
         alternates = [(section, name)]
 
         if item is not None:
             alternates.extend(item.alias)
+            if callable(item.default):
+                itemdefault = item.default()
+            else:
+                itemdefault = item.default
         else:
             msg = ("accessing unregistered config item: '%s.%s'")
             msg %= (section, name)
@@ -490,13 +494,12 @@
                 msg = "config item requires an explicit default value: '%s.%s'"
                 msg %= (section, name)
                 self.develwarn(msg, 2, 'warn-config-default')
-            elif callable(item.default):
-                    value = item.default()
             else:
-                value = item.default
+                value = itemdefault
         elif (item is not None
-              and item.default is not configitems.dynamicdefault):
-            msg = ("specifying a default value for a registered "
+              and item.default is not configitems.dynamicdefault
+              and default != itemdefault):
+            msg = ("specifying a mismatched default value for a registered "
                    "config item: '%s.%s' '%s'")
             msg %= (section, name, default)
             self.develwarn(msg, 2, 'warn-config-default')
--- a/setup.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/setup.py	Wed Nov 01 16:07:33 2017 -0400
@@ -218,7 +218,8 @@
     err = [e for e in err.splitlines()
            if (not e.startswith(b'not trusting file')
                and not e.startswith(b'warning: Not importing')
-               and not e.startswith(b'obsolete feature not enabled'))]
+               and not e.startswith(b'obsolete feature not enabled')
+               and not e.startswith(b'devel-warn:'))]
     return b'\n'.join(b'  ' + e for e in err)
 
 def findhg():
@@ -249,8 +250,6 @@
 
     # Fall back to trying the local hg installation.
     hgenv = localhgenv()
-    # Don't source any system hgrc files when using the local hg.
-    hgenv['HGRCPATH'] = ''
     hgcmd = [sys.executable, 'hg']
     try:
         retcode, out, err = runcmd(hgcmd + check_cmd, hgenv)
--- a/tests/dumbhttp.py	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/dumbhttp.py	Wed Nov 01 16:07:33 2017 -0400
@@ -26,12 +26,16 @@
 else:
     simplehttpserver = httpserver.httpserver
 
+class _httprequesthandler(httpserver.simplehttprequesthandler):
+    def log_message(self, format, *args):
+        httpserver.simplehttprequesthandler.log_message(self, format, *args)
+        sys.stderr.flush()
+
 class simplehttpservice(object):
     def __init__(self, host, port):
         self.address = (host, port)
     def init(self):
-        self.httpd = simplehttpserver(
-            self.address, httpserver.simplehttprequesthandler)
+        self.httpd = simplehttpserver(self.address, _httprequesthandler)
     def run(self):
         self.httpd.serve_forever()
 
@@ -41,6 +45,7 @@
         help='TCP port to listen on', metavar='PORT')
     parser.add_option('-H', '--host', dest='host', default='localhost',
         help='hostname or IP to listen on', metavar='HOST')
+    parser.add_option('--logfile', help='file name of access/error log')
     parser.add_option('--pid', dest='pid',
         help='file name where the PID of the server is stored')
     parser.add_option('-f', '--foreground', dest='foreground',
@@ -52,6 +57,9 @@
 
     signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
 
+    if options.foreground and options.logfile:
+        parser.error("options --logfile and --foreground are mutually "
+                     "exclusive")
     if options.foreground and options.pid:
         parser.error("options --pid and --foreground are mutually exclusive")
 
@@ -60,4 +68,5 @@
             'daemon_postexec': options.daemon_postexec}
     service = simplehttpservice(options.host, options.port)
     server.runservice(opts, initfn=service.init, runfn=service.run,
+                      logfile=options.logfile,
                       runargs=[sys.executable, __file__] + sys.argv[1:])
--- a/tests/test-arbitraryfilectx.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-arbitraryfilectx.t	Wed Nov 01 16:07:33 2017 -0400
@@ -19,6 +19,7 @@
   $ mkdir case1
   $ cd case1
   $ hg init
+#if symlink
   $ printf "A" > real_A
   $ printf "foo" > A
   $ printf "foo" > B
@@ -29,6 +30,44 @@
   adding real_A
   adding sym_A
   $ hg commit -m "base"
+#else
+  $ hg import -q --bypass - <<EOF
+  > # HG changeset patch
+  > # User test
+  > # Date 0 0
+  > base
+  > 
+  > diff --git a/A b/A
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/A
+  > @@ -0,0 +1,1 @@
+  > +foo
+  > \ No newline at end of file
+  > diff --git a/B b/B
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/B
+  > @@ -0,0 +1,1 @@
+  > +foo
+  > \ No newline at end of file
+  > diff --git a/real_A b/real_A
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/real_A
+  > @@ -0,0 +1,1 @@
+  > +A
+  > \ No newline at end of file
+  > diff --git a/sym_A b/sym_A
+  > new file mode 120000
+  > --- /dev/null
+  > +++ b/sym_A
+  > @@ -0,0 +1,1 @@
+  > +A
+  > \ No newline at end of file
+  > EOF
+  $ hg up -q
+#endif
 
 These files are different and should return True (different):
 (Note that filecmp.cmp's return semantics are inverted from ours, so we invert
@@ -53,5 +92,10 @@
 
 A naive use of filecmp on those two would wrongly return True, since it follows
 the symlink to "A", which has different contents.
+#if symlink
   $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
   True (no-eol)
+#else
+  $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
+  False (no-eol)
+#endif
--- a/tests/test-audit-path.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-audit-path.t	Wed Nov 01 16:07:33 2017 -0400
@@ -104,8 +104,7 @@
   back/test
 #if symlink
   $ hg update -Cr2
-  back: is both a file and a directory
-  abort: destination manifest contains path conflicts
+  abort: path 'back/test' traverses symbolic link 'back'
   [255]
 #else
 ('back' will be a file and cause some other system specific error)
@@ -167,12 +166,8 @@
 
   $ hg up -qC 1
   $ hg merge 2
-  a: path conflict - a file or link has the same name as a directory
-  the local file has been renamed to a~aa04623eb0c3
-  resolve manually then use 'hg resolve --mark a'
-  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
-  [1]
+  abort: path 'a/poisoned' traverses symbolic link 'a'
+  [255]
 
 try rebase onto other revision: cache of audited paths should be discarded,
 and the rebase should fail (issue5628)
@@ -180,11 +175,8 @@
   $ hg up -qC 2
   $ hg rebase -s 2 -d 1 --config extensions.rebase=
   rebasing 2:e73c21d6b244 "file a/poisoned" (tip)
-  a: path conflict - a file or link has the same name as a directory
-  the local file has been renamed to a~aa04623eb0c3
-  resolve manually then use 'hg resolve --mark a'
-  unresolved conflicts (see hg resolve, then hg rebase --continue)
-  [1]
+  abort: path 'a/poisoned' traverses symbolic link 'a'
+  [255]
   $ ls ../merge-symlink-out
 
   $ cd ..
@@ -216,8 +208,7 @@
 
   $ hg up -qC 0
   $ hg up 1
-  a: is both a file and a directory
-  abort: destination manifest contains path conflicts
+  abort: path 'a/b' traverses symbolic link 'a'
   [255]
 
 try linear update including symlinked directory and its content: paths are
@@ -226,8 +217,7 @@
 
   $ hg up -qC null
   $ hg up 1
-  a: is both a file and a directory
-  abort: destination manifest contains path conflicts
+  abort: path 'a/b' traverses symbolic link 'a'
   [255]
   $ ls ../update-symlink-out
 
@@ -238,8 +228,7 @@
   $ rm -f a
   $ hg up -qC 2
   $ hg up 1
-  a: is both a file and a directory
-  abort: destination manifest contains path conflicts
+  abort: path 'a/b' traverses symbolic link 'a'
   [255]
   $ ls ../update-symlink-out
 
--- a/tests/test-bookmarks-pushpull.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-bookmarks-pushpull.t	Wed Nov 01 16:07:33 2017 -0400
@@ -10,7 +10,10 @@
   > evolution.exchange=True
   > EOF
 
-  $ TESTHOOK='hooks.txnclose-bookmark.test=echo "test-hook-bookmark: $HG_BOOKMARK:  $HG_OLDNODE -> $HG_NODE"'
+  $ cat > $TESTTMP/hook.sh <<'EOF'
+  > echo "test-hook-bookmark: $HG_BOOKMARK:  $HG_OLDNODE -> $HG_NODE"
+  > EOF
+  $ TESTHOOK="hooks.txnclose-bookmark.test=sh $TESTTMP/hook.sh"
 
 initialize
 
--- a/tests/test-bookmarks.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-bookmarks.t	Wed Nov 01 16:07:33 2017 -0400
@@ -2,7 +2,10 @@
   $ hg init repo
   $ cd repo
 
-  $ TESTHOOK='hooks.txnclose-bookmark.test=echo "test-hook-bookmark: $HG_BOOKMARK:  $HG_OLDNODE -> $HG_NODE"'
+  $ cat > $TESTTMP/hook.sh <<'EOF'
+  > echo "test-hook-bookmark: $HG_BOOKMARK:  $HG_OLDNODE -> $HG_NODE"
+  > EOF
+  $ TESTHOOK="hooks.txnclose-bookmark.test=sh $TESTTMP/hook.sh"
 
 no bookmarks
 
@@ -1074,8 +1077,8 @@
 
   $ cat << EOF >> .hg/hgrc
   > [hooks]
-  > pretxnclose-bookmark.force-public  = (echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z "\$HG_NODE" ] || (hg log -r "\$HG_NODE" -T '{phase}' | grep public > /dev/null)
-  > pretxnclose-bookmark.force-forward = (echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z "\$HG_NODE" ] || (hg log -r "max(\$HG_OLDNODE::\$HG_NODE)" -T 'MATCH' | grep MATCH > /dev/null)
+  > pretxnclose-bookmark.force-public  = sh -c "(echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z \"\$HG_NODE\" ] || (hg log -r \"\$HG_NODE\" -T '{phase}' | grep public > /dev/null)"
+  > pretxnclose-bookmark.force-forward = sh -c "(echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z \"\$HG_NODE\" ] || (hg log -r \"max(\$HG_OLDNODE::\$HG_NODE)\" -T 'MATCH' | grep MATCH > /dev/null)"
   > EOF
 
   $ hg log -G -T phases
--- a/tests/test-commandserver.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-commandserver.t	Wed Nov 01 16:07:33 2017 -0400
@@ -975,12 +975,8 @@
   *** runcommand up -qC 2
   *** runcommand up -qC 1
   *** runcommand merge 2
-  a: path conflict - a file or link has the same name as a directory
-  the local file has been renamed to a~aa04623eb0c3
-  resolve manually then use 'hg resolve --mark a'
-  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
-   [1]
+  abort: path 'a/poisoned' traverses symbolic link 'a'
+   [255]
   $ ls ../merge-symlink-out
 
 cache of repo.auditor should be discarded, so matcher would never traverse
--- a/tests/test-devel-warnings.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-devel-warnings.t	Wed Nov 01 16:07:33 2017 -0400
@@ -352,17 +352,21 @@
   > 
   > configitem('test', 'some', default='foo')
   > configitem('test', 'dynamic', default=configitems.dynamicdefault)
+  > configitem('test', 'callable', default=list)
   > # overwrite a core config
   > configitem('ui', 'quiet', default=False)
   > configitem('ui', 'interactive', default=None)
   > 
   > @command(b'buggyconfig')
   > def cmdbuggyconfig(ui, repo):
-  >     repo.ui.config('ui', 'quiet', False)
-  >     repo.ui.config('ui', 'interactive', None)
+  >     repo.ui.config('ui', 'quiet', True)
+  >     repo.ui.config('ui', 'interactive', False)
+  >     repo.ui.config('test', 'some', 'bar')
   >     repo.ui.config('test', 'some', 'foo')
   >     repo.ui.config('test', 'dynamic', 'some-required-default')
   >     repo.ui.config('test', 'dynamic')
+  >     repo.ui.config('test', 'callable', [])
+  >     repo.ui.config('test', 'callable', 'foo')
   >     repo.ui.config('test', 'unregistered')
   >     repo.ui.config('unregistered', 'unregistered')
   > EOF
@@ -370,10 +374,11 @@
   $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig
   devel-warn: extension 'buggyconfig' overwrite config item 'ui.interactive' at: */mercurial/extensions.py:* (_loadextra) (glob)
   devel-warn: extension 'buggyconfig' overwrite config item 'ui.quiet' at: */mercurial/extensions.py:* (_loadextra) (glob)
-  devel-warn: specifying a default value for a registered config item: 'ui.quiet' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
-  devel-warn: specifying a default value for a registered config item: 'ui.interactive' 'None' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
-  devel-warn: specifying a default value for a registered config item: 'test.some' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
+  devel-warn: specifying a mismatched default value for a registered config item: 'ui.quiet' 'True' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
+  devel-warn: specifying a mismatched default value for a registered config item: 'ui.interactive' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
+  devel-warn: specifying a mismatched default value for a registered config item: 'test.some' 'bar' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
   devel-warn: config item requires an explicit default value: 'test.dynamic' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
+  devel-warn: specifying a mismatched default value for a registered config item: 'test.callable' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
   devel-warn: accessing unregistered config item: 'test.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
   devel-warn: accessing unregistered config item: 'unregistered.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-dirstate-backup.t	Wed Nov 01 16:07:33 2017 -0400
@@ -0,0 +1,18 @@
+Set up
+
+  $ hg init repo
+  $ cd repo
+
+Try to import an empty patch
+
+  $ hg import --no-commit - <<EOF
+  > EOF
+  applying patch from stdin
+  abort: stdin: no diffs found
+  [255]
+
+No dirstate backups are left behind
+
+  $ ls .hg/dirstate* | sort
+  .hg/dirstate
+
--- a/tests/test-extension.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-extension.t	Wed Nov 01 16:07:33 2017 -0400
@@ -813,7 +813,7 @@
   $ echo "multirevs = multirevs.py" >> $HGRCPATH
 
   $ hg help multirevs | tail
-        bookmark (this works because the last revision of the revset is used):
+        used):
   
           hg update :@
   
--- a/tests/test-help.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-help.t	Wed Nov 01 16:07:33 2017 -0400
@@ -980,6 +980,7 @@
        bundles       Bundles
        censor        Censor
        changegroups  Changegroups
+       config        Config Register
        requirements  Repository Requirements
        revlogs       Revision Logs
        wireprotocol  Wire Protocol
@@ -1875,7 +1876,7 @@
       Note:
          After selecting a merge program, Mercurial will by default attempt to
          merge the files using a simple merge algorithm first. Only if it
-         doesn't succeed because of conflicting changes Mercurial will actually
+         doesn't succeed because of conflicting changes will Mercurial actually
          execute the merge program. Whether to use the simple merge algorithm
          first can be controlled by the premerge setting of the merge tool.
          Premerge is enabled by default unless the file is binary or a symlink.
@@ -3054,6 +3055,13 @@
   Changegroups
   </td></tr>
   <tr><td>
+  <a href="/help/internals.config">
+  config
+  </a>
+  </td><td>
+  Config Register
+  </td></tr>
+  <tr><td>
   <a href="/help/internals.requirements">
   requirements
   </a>
--- a/tests/test-log-linerange.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-log-linerange.t	Wed Nov 01 16:07:33 2017 -0400
@@ -800,7 +800,7 @@
 Binary files work but without diff hunks filtering.
 (Checking w/ and w/o diff.git option.)
 
-  >>> open('binary', 'w').write('this\nis\na\nbinary\0')
+  >>> open('binary', 'wb').write('this\nis\na\nbinary\0')
   $ hg add binary
   $ hg ci -m 'add a binary file' --quiet
   $ hg log -f -L binary,1:2 -p
--- a/tests/test-merge1.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-merge1.t	Wed Nov 01 16:07:33 2017 -0400
@@ -30,22 +30,23 @@
 
   $ mkdir b && touch b/nonempty
   $ hg up
-  b: untracked directory conflicts with file
-  abort: untracked files in working directory differ from files in requested revision
-  [255]
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg ci
   nothing changed
   [1]
   $ hg sum
-  parent: 0:538afb845929 
-   commit #0
+  parent: 1:b8bb4a988f25 tip
+   commit #1
   branch: default
-  commit: 1 unknown (clean)
-  update: 1 new changesets (update)
+  commit: (clean)
+  update: (current)
   phases: 2 draft
-  $ rm b/nonempty
+
+The following line is commented out because the file doesn't exist at the moment, and some OSes error out even with `rm -f`.
+$ rm b/nonempty
+
   $ hg up
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg sum
   parent: 1:b8bb4a988f25 tip
    commit #1
--- a/tests/test-pager-legacy.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-pager-legacy.t	Wed Nov 01 16:07:33 2017 -0400
@@ -194,6 +194,36 @@
   $ hg --config pager.attend-echoa=yes echoa
   paged! 'a\n'
 
+Pager attributes should be copied to mq repo. Otherwise pager would be started
+twice and color mode would be lost.
+
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > mq =
+  > EOF
+  $ hg init --mq
+  $ hg qnew foo.patch
+  $ hg qpop
+  popping foo.patch
+  patch queue now empty
+  $ hg ci --mq -m 'commit patches'
+  $ hg log --mq --debug
+  starting pager for command 'extension-via-attend-log'
+  paged! '\x1b[0;33mchangeset:   0:6cc2ded15503e368aaf76b6cc3d12f320c9e3b87\x1b[0m\n'
+  paged! 'tag:         tip\n'
+  paged! 'phase:       draft\n'
+  paged! 'parent:      -1:0000000000000000000000000000000000000000\n'
+  paged! 'parent:      -1:0000000000000000000000000000000000000000\n'
+  paged! 'manifest:    0:4980de1ae1b612014d5bcfa9507da84ce8891daa\n'
+  paged! 'user:        test\n'
+  paged! 'date:        Thu Jan 01 00:00:00 1970 +0000\n'
+  paged! 'files+:      .hgignore foo.patch series\n'
+  paged! 'extra:       branch=default\n'
+  paged! 'description:\n'
+  paged! 'commit patches\n'
+  paged! '\n'
+  paged! '\n'
+
 Pager works with hg aliases including environment variables.
 
   $ cat >> $HGRCPATH <<'EOF'
--- a/tests/test-pathconflicts-basic.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-pathconflicts-basic.t	Wed Nov 01 16:07:33 2017 -0400
@@ -1,3 +1,11 @@
+Path conflict checking is currently disabled by default because of issue5716.
+Turn it on for this test.
+
+  $ cat >> $HGRCPATH << EOF
+  > [experimental]
+  > merge.checkpathconflicts=True
+  > EOF
+
   $ hg init repo
   $ cd repo
   $ echo base > base
@@ -96,4 +104,3 @@
   commit: (clean)
   update: 1 new changesets, 2 branch heads (merge)
   phases: 4 draft
-
--- a/tests/test-pathconflicts-merge.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-pathconflicts-merge.t	Wed Nov 01 16:07:33 2017 -0400
@@ -1,3 +1,11 @@
+Path conflict checking is currently disabled by default because of issue5716.
+Turn it on for this test.
+
+  $ cat >> $HGRCPATH << EOF
+  > [experimental]
+  > merge.checkpathconflicts=True
+  > EOF
+
   $ hg init repo
   $ cd repo
   $ echo base > base
--- a/tests/test-pathconflicts-update.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-pathconflicts-update.t	Wed Nov 01 16:07:33 2017 -0400
@@ -1,3 +1,11 @@
+Path conflict checking is currently disabled by default because of issue5716.
+Turn it on for this test.
+
+  $ cat >> $HGRCPATH << EOF
+  > [experimental]
+  > merge.checkpathconflicts=True
+  > EOF
+
   $ hg init repo
   $ cd repo
   $ echo base > base
@@ -150,4 +158,3 @@
   $ hg up file2 --clean
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (activating bookmark file2)
-
--- a/tests/test-phases.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-phases.t	Wed Nov 01 16:07:33 2017 -0400
@@ -1,9 +1,12 @@
+  $ cat > $TESTTMP/hook.sh << 'EOF'
+  > echo "test-hook-close-phase: $HG_NODE:  $HG_OLDPHASE -> $HG_PHASE"
+  > EOF
 
   $ cat >> $HGRCPATH << EOF
   > [extensions]
   > phasereport=$TESTDIR/testlib/ext-phase-report.py
   > [hooks]
-  > txnclose-phase.test = echo "test-hook-close-phase: \$HG_NODE:  \$HG_OLDPHASE -> \$HG_PHASE"
+  > txnclose-phase.test = sh $TESTTMP/hook.sh
   > EOF
 
   $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
@@ -796,7 +799,7 @@
 
   $ cat >> .hg/hgrc << EOF
   > [hooks]
-  > pretxnclose-phase.nopublish_D = (echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]
+  > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]"
   > EOF
 
 Try various actions. only the draft move should succeed
--- a/tests/test-push-http.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-push-http.t	Wed Nov 01 16:07:33 2017 -0400
@@ -56,12 +56,16 @@
 
 expect success
 
+  $ cat > $TESTTMP/hook.sh <<'EOF'
+  > echo "phase-move: $HG_NODE:  $HG_OLDPHASE -> $HG_PHASE"
+  > EOF
+
   $ cat >> .hg/hgrc <<EOF
   > allow_push = *
   > [hooks]
   > changegroup = sh -c "printenv.py changegroup 0"
   > pushkey = sh -c "printenv.py pushkey 0"
-  > txnclose-phase.test = echo "phase-move: \$HG_NODE:  \$HG_OLDPHASE -> \$HG_PHASE"
+  > txnclose-phase.test = sh $TESTTMP/hook.sh 
   > EOF
   $ req
   pushing to http://localhost:$HGPORT/
--- a/tests/test-static-http.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-static-http.t	Wed Nov 01 16:07:33 2017 -0400
@@ -9,7 +9,8 @@
 This server doesn't do range requests so it's basically only good for
 one pull
 
-  $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
+  $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid \
+  > --logfile server.log
   $ cat dumb.pid >> $DAEMON_PIDS
   $ hg init remote
   $ cd remote
@@ -214,3 +215,58 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
   $ killdaemons.py
+
+List of files accessed over HTTP:
+
+  $ cat server.log | sed -n -e 's|.*GET \(/[^ ]*\).*|\1|p' | sort -u
+  /.hg/bookmarks
+  /.hg/bookmarks.current
+  /.hg/cache/hgtagsfnodes1
+  /.hg/requires
+  /.hg/store/00changelog.i
+  /.hg/store/00manifest.i
+  /.hg/store/data/%7E2ehgsub.i
+  /.hg/store/data/%7E2ehgsubstate.i
+  /.hg/store/data/a.i
+  /notarepo/.hg/00changelog.i
+  /notarepo/.hg/requires
+  /remote-with-names/.hg/bookmarks
+  /remote-with-names/.hg/bookmarks.current
+  /remote-with-names/.hg/cache/branch2-served
+  /remote-with-names/.hg/cache/hgtagsfnodes1
+  /remote-with-names/.hg/cache/tags2-served
+  /remote-with-names/.hg/localtags
+  /remote-with-names/.hg/requires
+  /remote-with-names/.hg/store/00changelog.i
+  /remote-with-names/.hg/store/00manifest.i
+  /remote-with-names/.hg/store/data/%7E2ehgtags.i
+  /remote-with-names/.hg/store/data/foo.i
+  /remote/.hg/bookmarks
+  /remote/.hg/bookmarks.current
+  /remote/.hg/cache/branch2-base
+  /remote/.hg/cache/branch2-immutable
+  /remote/.hg/cache/branch2-served
+  /remote/.hg/cache/hgtagsfnodes1
+  /remote/.hg/cache/rbc-names-v1
+  /remote/.hg/cache/tags2-served
+  /remote/.hg/localtags
+  /remote/.hg/requires
+  /remote/.hg/store/00changelog.i
+  /remote/.hg/store/00manifest.i
+  /remote/.hg/store/data/%7E2edotfile%20with%20spaces.i
+  /remote/.hg/store/data/%7E2ehgtags.i
+  /remote/.hg/store/data/bar.i
+  /remote/.hg/store/data/quux.i
+  /remotempty/.hg/bookmarks
+  /remotempty/.hg/bookmarks.current
+  /remotempty/.hg/requires
+  /remotempty/.hg/store/00changelog.i
+  /remotempty/.hg/store/00manifest.i
+  /sub/.hg/bookmarks
+  /sub/.hg/bookmarks.current
+  /sub/.hg/cache/hgtagsfnodes1
+  /sub/.hg/requires
+  /sub/.hg/store/00changelog.i
+  /sub/.hg/store/00manifest.i
+  /sub/.hg/store/data/%7E2ehgtags.i
+  /sub/.hg/store/data/test.i
--- a/tests/test-update-branches.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-update-branches.t	Wed Nov 01 16:07:33 2017 -0400
@@ -184,17 +184,17 @@
   parent=2
 
   $ revtest '-cC dirty linear'  dirty 1 2 -cC
-  abort: can only specify one of -C/--clean, -c/--check, or -m/merge
+  abort: can only specify one of -C/--clean, -c/--check, or -m/--merge
   parent=1
   M foo
 
   $ revtest '-mc dirty linear'  dirty 1 2 -mc
-  abort: can only specify one of -C/--clean, -c/--check, or -m/merge
+  abort: can only specify one of -C/--clean, -c/--check, or -m/--merge
   parent=1
   M foo
 
   $ revtest '-mC dirty linear'  dirty 1 2 -mC
-  abort: can only specify one of -C/--clean, -c/--check, or -m/merge
+  abort: can only specify one of -C/--clean, -c/--check, or -m/--merge
   parent=1
   M foo
 
--- a/tests/test-update-names.t	Wed Nov 01 08:31:16 2017 -0200
+++ b/tests/test-update-names.t	Wed Nov 01 16:07:33 2017 -0400
@@ -50,9 +50,7 @@
   $ hg st
   ? name/file
   $ hg up 1
-  name: untracked directory conflicts with file
-  abort: untracked files in working directory differ from files in requested revision
-  [255]
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd ..
 
 #if symlink