merge with stable
authorAugie Fackler <augie@google.com>
Wed, 01 Aug 2018 10:23:57 -0400
changeset 38807 813e726e5343
parent 38738 faea9b1980d9 (current diff)
parent 38765 cc8657f6fd3e (diff)
child 38808 eb2945f0a4a1
merge with stable
--- a/.hgsigs	Thu Jul 19 22:30:37 2018 +0530
+++ b/.hgsigs	Wed Aug 01 10:23:57 2018 -0400
@@ -166,3 +166,5 @@
 6614cac550aea66d19c601e45efd1b7bd08d7c40 0 iQJVBAABCAA/FiEEOoFVFj0OIKUw/LeGR6Z/+qNGqs4FAlruOCQhHGtidWxsb2NrK21lcmN1cmlhbEByaW5nd29ybGQub3JnAAoJEEemf/qjRqrOENQQAI1ttaffqYucUEyBARP1GDlZMIGDJgNG7smPMU4Sw7YEzB9mcmxnBFlPx/9n973ucEnLJVONBSZq0VWIKJwPp1RMBpAHuGrMlhkMvYIAukg5EBN3YpA1UogHYycwLj2Ye7fNgiN5FIkaodt9++c4d1Lfu658A2pAeg8qUn5uJ77vVcZRp988u9eVDQfubS8P6bB4KZc87VDAUUeXy+AcS9KHGBmdRAabwU4m09VPZ4h8NEj3+YUPnKXBaNK9pXK5pnkmB8uFePayimnw6St6093oylQTVw/tfxGLBImnHw+6KCu2ut9r5PxXEVxVYpranGbS4jYqpzRtpQBxyo/Igu7fqrioR2rGLQL5NcHsoUEdOC7VW+0HgHjXKtRy7agmcFcgjFco47D3hor7Y16lwgm+RV2EWQ/u2M4Bbo1EWj1oxQ/0j5DOM5UeAJ3Jh64gb4sCDqJfADR8NQaxh7QiqYhn69IcjsEfzU/11VuqWXlQgghJhEEP/bojRyM0qee87CKLiTescafIfnRsNQhyhsKqdHU1QAp29cCqh3mzNxJH3PDYg4fjRaGW4PM7K5gmSXFn/Ifeza0cuZ4XLdYZ76Z1BG80pqBpKZy1unGob+RpItlSmO5jQw7OoRuf0q3Id92gawUDDLuQ7Xg3zOVqV8/wJBlHM7ZUz162bnNsO5Hn
 9c5ced5276d6e7d54f7c3dadf5247b7ee98ec79c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+++ b/.hgtags	Wed Aug 01 10:23:57 2018 -0400
@@ -179,3 +179,5 @@
 6614cac550aea66d19c601e45efd1b7bd08d7c40 4.6
 9c5ced5276d6e7d54f7c3dadf5247b7ee98ec79c 4.6.1
 0b63a6743010dfdbf8a8154186e119949bdaa1cc 4.6.2
+e90130af47ce8dd53a3109aed9d15876b3e7dee8 4.7rc0
+33ac6a72308a215e6086fbced347ec10aa963b0a 4.7
--- a/mercurial/configitems.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/configitems.py	Wed Aug 01 10:23:57 2018 -0400
@@ -927,9 +927,9 @@
 coreconfigitem('push', 'pushvars.server',
     default=False,
 )
-coreconfigitem('revlog', 'optimize-delta-parent-choice',
+coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
     default=True,
-    # formely an experimental option: format.aggressivemergedeltas
+    alias=[('format', 'aggressivemergedeltas')],
 )
 coreconfigitem('server', 'bookmarks-pushkey-compat',
     default=True,
--- a/mercurial/context.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/context.py	Wed Aug 01 10:23:57 2018 -0400
@@ -411,6 +411,7 @@
                     self._rev = repo.changelog.rev(changeid)
                     return
                 except error.FilteredLookupError:
+                    changeid = hex(changeid) # for the error message
                     raise
                 except LookupError:
                     # check if it might have come from damaged dirstate
@@ -591,7 +592,7 @@
 
     def descendant(self, other):
         msg = (b'ctx.descendant(other) is deprecated, '
-               'use ctx.isancestorof(other)')
+               b'use ctx.isancestorof(other)')
         self._repo.ui.deprecwarn(msg, b'4.7')
         return self.isancestorof(other)
 
@@ -2326,7 +2327,12 @@
         revision being committed, or None."""
         super(memfilectx, self).__init__(repo, path, None, changectx)
         self._data = data
-        self._flags = (islink and 'l' or '') + (isexec and 'x' or '')
+        if islink:
+            self._flags = 'l'
+        elif isexec:
+            self._flags = 'x'
+        else:
+            self._flags = ''
         self._copied = None
         if copied:
             self._copied = (copied, nullid)
--- a/mercurial/encoding.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/encoding.py	Wed Aug 01 10:23:57 2018 -0400
@@ -72,6 +72,11 @@
     '646': lambda: 'ascii',
     'ANSI_X3.4-1968': lambda: 'ascii',
 }
+# cp65001 is a Windows variant of utf-8, which isn't supported on Python 2.
+# No idea if it should be rewritten to the canonical name 'utf-8' on Python 3.
+# https://bugs.python.org/issue13216
+if pycompat.iswindows and not pycompat.ispy3:
+    _encodingfixers['cp65001'] = lambda: 'utf-8'
 
 try:
     encoding = environ.get("HGENCODING")
--- a/mercurial/fileset.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/fileset.py	Wed Aug 01 10:23:57 2018 -0400
@@ -592,7 +592,9 @@
                 try:
                     return predfn(fctx)
                 except (IOError, OSError) as e:
-                    if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EISDIR):
+                    # open()-ing a directory fails with EACCES on Windows
+                    if e.errno in (errno.ENOENT, errno.EACCES, errno.ENOTDIR,
+                                   errno.EISDIR):
                         return False
                     raise
         else:
--- a/mercurial/help/config.txt	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/help/config.txt	Wed Aug 01 10:23:57 2018 -0400
@@ -1773,13 +1773,13 @@
 
 Alias definitions for revsets. See :hg:`help revsets` for details.
 
-``revlog``
-----------
+``storage``
+-----------
 
 Control the strategy Mercurial uses internally to store history. Options in this
 category impact performance and repository size.
 
-``optimize-delta-parent-choice``
+``revlog.optimize-delta-parent-choice``
     When storing a merge revision, both parents will be equally considered as
     a possible delta base. This results in better delta selection and improved
     revlog compression. This option is enabled by default.
--- a/mercurial/hg.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/hg.py	Wed Aug 01 10:23:57 2018 -0400
@@ -731,8 +731,14 @@
                 uprev = None
                 status = None
                 if checkout is not None:
-                    if checkout in destrepo:
+                    # Some extensions (at least hg-git and hg-subversion) have
+                    # a peer.lookup() implementation that returns a name instead
+                    # of a nodeid. We work around it here until we've figured
+                    # out a better solution.
+                    if len(checkout) == 20 and checkout in destrepo:
                         uprev = checkout
+                    elif scmutil.isrevsymbol(destrepo, checkout):
+                        uprev = scmutil.revsymbol(destrepo, checkout).node()
                     else:
                         if update is not True:
                             try:
--- a/mercurial/hgweb/hgweb_mod.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Aug 01 10:23:57 2018 -0400
@@ -136,7 +136,7 @@
         logourl = self.config('web', 'logourl')
         logoimg = self.config('web', 'logoimg')
         staticurl = (self.config('web', 'staticurl')
-                     or req.apppath + '/static/')
+                     or req.apppath.rstrip('/') + '/static/')
         if not staticurl.endswith('/'):
             staticurl += '/'
 
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Aug 01 10:23:57 2018 -0400
@@ -514,7 +514,7 @@
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
         staticurl = (config('web', 'staticurl')
-                     or req.apppath + '/static/')
+                     or req.apppath.rstrip('/') + '/static/')
         if not staticurl.endswith('/'):
             staticurl += '/'
 
--- a/mercurial/localrepo.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/localrepo.py	Wed Aug 01 10:23:57 2018 -0400
@@ -668,8 +668,8 @@
         manifestcachesize = self.ui.configint('format', 'manifestcachesize')
         if manifestcachesize is not None:
             self.svfs.options['manifestcachesize'] = manifestcachesize
-        deltabothparents = self.ui.configbool('revlog',
-                                              'optimize-delta-parent-choice')
+        deltabothparents = self.ui.configbool('storage',
+            'revlog.optimize-delta-parent-choice')
         self.svfs.options['deltabothparents'] = deltabothparents
         self.svfs.options['lazydeltabase'] = not scmutil.gddeltaconfig(self.ui)
         chainspan = self.ui.configbytes('experimental', 'maxdeltachainspan')
@@ -689,6 +689,8 @@
         self.svfs.options['sparse-read-min-gap-size'] = srmingapsize
         sparserevlog = SPARSEREVLOG_REQUIREMENT in self.requirements
         self.svfs.options['sparse-revlog'] = sparserevlog
+        if sparserevlog:
+            self.svfs.options['generaldelta'] = True
 
         for r in self.requirements:
             if r.startswith('exp-compression-'):
--- a/mercurial/match.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/match.py	Wed Aug 01 10:23:57 2018 -0400
@@ -692,7 +692,7 @@
     The prefix path should usually be the relative path from the root of
     this matcher to the root of the wrapped matcher.
 
-    >>> m1 = match(b'root/d/e', b'f', [b'../a.txt', b'b.txt'])
+    >>> m1 = match(util.localpath(b'root/d/e'), b'f', [b'../a.txt', b'b.txt'])
     >>> m2 = prefixdirmatcher(b'root', b'd/e/f', b'd/e', m1)
     >>> bool(m2(b'a.txt'),)
     False
--- a/mercurial/merge.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/merge.py	Wed Aug 01 10:23:57 2018 -0400
@@ -1424,14 +1424,13 @@
                 del actions[f]
         repo.ui.note(_('end of auction\n\n'))
 
-    _resolvetrivial(repo, wctx, mctx, ancestors[0], actions)
-
     if wctx.rev() is None:
         fractions = _forgetremoved(wctx, mctx, branchmerge)
         actions.update(fractions)
 
     prunedactions = sparse.filterupdatesactions(repo, wctx, mctx, branchmerge,
                                                 actions)
+    _resolvetrivial(repo, wctx, mctx, ancestors[0], actions)
 
     return prunedactions, diverge, renamedelete
 
--- a/mercurial/revlog.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/revlog.py	Wed Aug 01 10:23:57 2018 -0400
@@ -1701,8 +1701,8 @@
         return self.isancestorrev(a, b)
 
     def descendant(self, a, b):
-        msg = (b'revlog.descendant is deprecated, use revlog.isancestorrev')
-        self._repo.ui.deprecwarn(msg, b'4.7')
+        msg = 'revlog.descendant is deprecated, use revlog.isancestorrev'
+        util.nouideprecwarn(msg, '4.7')
         return self.isancestorrev(a, b)
 
     def isancestorrev(self, a, b):
--- a/mercurial/scmutil.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/scmutil.py	Wed Aug 01 10:23:57 2018 -0400
@@ -1366,7 +1366,8 @@
     """
     # experimental config: format.generaldelta
     return (ui.configbool('format', 'generaldelta')
-            or ui.configbool('format', 'usegeneraldelta'))
+            or ui.configbool('format', 'usegeneraldelta')
+            or ui.configbool('format', 'sparse-revlog'))
 
 def gddeltaconfig(ui):
     """helper function to know if incoming delta should be optimised
--- a/mercurial/templates/gitweb/error.tmpl	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/templates/gitweb/error.tmpl	Wed Aug 01 10:23:57 2018 -0400
@@ -17,6 +17,7 @@
 <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> |
 <a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> |
 <a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a> |
 <a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> |
 <a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a> |
 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> |
--- a/mercurial/ui.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/ui.py	Wed Aug 01 10:23:57 2018 -0400
@@ -67,8 +67,6 @@
 update.check = noconflict
 # Show conflicts information in `hg status`
 status.verbose = True
-# Collapse entire directories that contain only unknown files
-status.terse = u
 
 [diff]
 git = 1
--- a/mercurial/worker.py	Thu Jul 19 22:30:37 2018 +0530
+++ b/mercurial/worker.py	Wed Aug 01 10:23:57 2018 -0400
@@ -212,6 +212,7 @@
         signal.signal(signal.SIGINT, oldhandler)
         waitforworkers()
         signal.signal(signal.SIGCHLD, oldchldhandler)
+        selector.close()
         status = problem[0]
         if status:
             if status < 0:
--- a/tests/test-diff-color.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-diff-color.t	Wed Aug 01 10:23:57 2018 -0400
@@ -54,8 +54,10 @@
 trailing whitespace
 
   $ cp a a.orig
-  $ sed 's/^dd$/dd \r/' a >a.new
-  $ mv a.new a
+  >>> with open('a', 'rb') as f:
+  ...     data = f.read()
+  >>> with open('a', 'wb') as f:
+  ...     f.write(data.replace('dd', 'dd \r'))
   $ hg diff --nodates
   \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
   \x1b[0;31;1m--- a/a\x1b[0m (esc)
--- a/tests/test-fileset.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-fileset.t	Wed Aug 01 10:23:57 2018 -0400
@@ -420,7 +420,7 @@
   c1
   c2
   c3
-  con.xml
+  con.xml (no-windows !)
   mixed
   unknown
   $ fileset 'eol(mac)'
@@ -442,7 +442,7 @@
   c1
   c2
   c3
-  con.xml
+  con.xml (no-windows !)
   dos
   mac
   mixed
--- a/tests/test-generaldelta.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-generaldelta.t	Wed Aug 01 10:23:57 2018 -0400
@@ -146,7 +146,7 @@
 - Verify aggressive merge uses p2 (commit 0) as delta parent
   $ hg up -q -C 1
   $ hg merge -q 0
-  $ hg commit -q -m merge --config revlog.optimize-delta-parent-choice=yes
+  $ hg commit -q -m merge --config storage.revlog.optimize-delta-parent-choice=yes
   $ hg debugdeltachain -m
       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
         0       1        1       -1    base         59        215         59   0.27442        59         0    0.00000
--- a/tests/test-obsmarker-template.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-obsmarker-template.t	Wed Aug 01 10:23:57 2018 -0400
@@ -2598,9 +2598,9 @@
   >    f.write(b't\xe8st2') and None
   > EOF
   $ mkcommit ROOT
-  $ HGENCODING=latin-1 HGUSER="`cat test1`" mkcommit A0
+  $ ( HGENCODING=latin-1 HGUSER="`cat test1`" mkcommit A0 )
   $ echo 42 >> A0
-  $ hg amend -m "A1" --note "`cat test2`"
+  $ HGENCODING=latin-1 hg amend -m "A1" --note "`cat test2`"
   $ HGENCODING=latin-1 hg amend -m "A2" \
   > --config devel.user.obsmarker="`cat test2`"
   $ mkcommit B0
@@ -2611,31 +2611,31 @@
 local encoding since the command is supposed to show unmodified content:
 
   $ HGENCODING=latin-1 hg debugobsolete
-  5f66a482f0bb2fcaccfc215554ad5eb9f40b50f5 718c0d00cee1429bdb73064e0d88908c601507a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'note': 't\xc3\xa8st2', 'operation': 'amend', 'user': 't\xc3\xa8st1'}
+  5f66a482f0bb2fcaccfc215554ad5eb9f40b50f5 718c0d00cee1429bdb73064e0d88908c601507a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'note': 't\xc3\xa8st2', 'operation': 'amend', 'user': 'test'}
   718c0d00cee1429bdb73064e0d88908c601507a8 1132562159b35bb27e1d6b80c80ee94a1659a4da 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 't\xc3\xa8st2'}
-  e1724525bc3bec4472d7915a02811b938004a7a2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 't\xc3\xa8st2'}
+  8f82db6f991db367fdbb3b6dba5e187ecc3ebd96 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 't\xc3\xa8st2'}
 
 metadata should be converted back to local encoding when displaying:
 
   $ HGENCODING=latin-1 hg fatelog --hidden
-  @  e1724525bc3b
+  @  8f82db6f991d
   |    Obsfate: pruned by t\xe8st2 (at 1970-01-01 00:00 +0000); (esc)
   o  1132562159b3
   |
   | x  718c0d00cee1
   |/     Obsfate: rewritten using amend as 3:1132562159b3 by t\xe8st2 (at 1970-01-01 00:00 +0000); (esc)
   | x  5f66a482f0bb
-  |/     Obsfate: rewritten using amend as 2:718c0d00cee1 by t\xe8st1 (at 1970-01-01 00:00 +0000); (esc)
+  |/     Obsfate: rewritten using amend as 2:718c0d00cee1 by test (at 1970-01-01 00:00 +0000);
   o  ea207398892e
   
   $ HGENCODING=utf-8 hg fatelog --hidden
-  @  e1724525bc3b
+  @  8f82db6f991d
   |    Obsfate: pruned by t\xc3\xa8st2 (at 1970-01-01 00:00 +0000); (esc)
   o  1132562159b3
   |
   | x  718c0d00cee1
   |/     Obsfate: rewritten using amend as 3:1132562159b3 by t\xc3\xa8st2 (at 1970-01-01 00:00 +0000); (esc)
   | x  5f66a482f0bb
-  |/     Obsfate: rewritten using amend as 2:718c0d00cee1 by t\xc3\xa8st1 (at 1970-01-01 00:00 +0000); (esc)
+  |/     Obsfate: rewritten using amend as 2:718c0d00cee1 by test (at 1970-01-01 00:00 +0000);
   o  ea207398892e
   
--- a/tests/test-sparse-merges.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-sparse-merges.t	Wed Aug 01 10:23:57 2018 -0400
@@ -60,3 +60,61 @@
   temporarily included 2 file(s) in the sparse checkout for merging
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
+
+  $ cd ..
+
+Tests merging a file which is modified in one branch and deleted in another and
+file is excluded from sparse checkout
+
+  $ hg init ytest
+  $ cd ytest
+  $ echo "syntax: glob" >> .hgignore
+  $ echo "*.orig" >> .hgignore
+  $ hg ci -Aqm "added .hgignore"
+  $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done;
+  $ cat >> .hg/hgrc <<EOF
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}"
+  > [extensions]
+  > sparse =
+  > EOF
+
+  $ hg glog
+  @  2:f29feff37cfc added d
+  |
+  o  1:617125d27d6b added a
+  |
+  o  0:53f3774ed939 added .hgignore
+  
+  $ hg rm d
+  $ hg ci -m "removed d"
+
+  $ hg up '.^'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg debugsparse --reset
+  $ echo bar >> d
+  $ hg ci -Am "added bar to d"
+  created new head
+
+  $ hg glog
+  @  4:6527874a90e4 added bar to d
+  |
+  | o  3:372c8558de45 removed d
+  |/
+  o  2:f29feff37cfc added d
+  |
+  o  1:617125d27d6b added a
+  |
+  o  0:53f3774ed939 added .hgignore
+  
+  $ hg debugsparse --exclude "d"
+  $ ls
+  a
+
+  $ hg merge
+  temporarily included 1 file(s) in the sparse checkout for merging
+  local [working copy] changed d which other [merge rev] deleted
+  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+  [1]
--- a/tests/test-status.t	Thu Jul 19 22:30:37 2018 +0530
+++ b/tests/test-status.t	Wed Aug 01 10:23:57 2018 -0400
@@ -109,8 +109,11 @@
 
 tweaking defaults works
   $ hg status --cwd a --config ui.tweakdefaults=yes
-  ? .
-  ? ../b/
+  ? 1/in_a_1
+  ? in_a
+  ? ../b/1/in_b_1
+  ? ../b/2/in_b_2
+  ? ../b/in_b
   ? ../in_root
   $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
   ? a/1/in_a_1 (glob)
@@ -120,8 +123,11 @@
   ? b/in_b (glob)
   ? in_root
   $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
-  ? .
-  ? ../b/
+  ? 1/in_a_1
+  ? in_a
+  ? ../b/1/in_b_1
+  ? ../b/2/in_b_2
+  ? ../b/in_b
   ? ../in_root (glob)
 
 relative paths can be requested
@@ -151,8 +157,11 @@
   > status.relative = False
   > EOF
   $ hg status --cwd a --config ui.tweakdefaults=yes
-  ? a/
-  ? b/
+  ? a/1/in_a_1
+  ? a/in_a
+  ? b/1/in_b_1
+  ? b/2/in_b_2
+  ? b/in_b
   ? in_root
 
   $ cd ..