merge with stable
authorPulkit Goyal <pulkit@yandex-team.ru>
Tue, 19 Mar 2019 16:36:59 +0300
changeset 41985 b1bc6e5f5249
parent 41982 f8c5225b9054 (current diff)
parent 41984 d1c33b2442a7 (diff)
child 41986 95e4ae86329f
merge with stable
mercurial/cmdutil.py
tests/test-https.t
--- a/.hgsigs	Sun Mar 03 20:16:22 2019 +0530
+++ b/.hgsigs	Tue Mar 19 16:36:59 2019 +0300
@@ -176,3 +176,4 @@
 197f092b2cd9691e2a55d198f717b231af9be6f9 0 iQJEBAABCAAuFiEEK8zhT1xnJaouqK63ucncgkqlvdUFAlwz6DUQHHJhZkBkdXJpbjQyLmNvbQAKCRC5ydyCSqW91SbtD/47TJkSFuDJrvrpLuZROeR48opM8kPtMdbFKZxmeUtap/1q1ahBcA8cnkf5t5iEna57OkPfx0FVw7zupFZSD970q8KeQa1C1oRf+DV83rkOqMEzTLmDYZ5YWWILyDb2NrSkBzArhLNhEtWrFFo9uoigwJWiyNGXUkjVd7XUaYvxVYvnHJcmr98l9sW+RxgV2Cm/6ImeW6BkSUjfrJpZlHUecxcHIaDVniSCVzVF7T+tgG0+CxpehmRrPE/qlPTY2DVHuG6ogwjmu7pWr4kW3M6pTmOYICKjkojIhPTAfNDZGNYruJMukEeB2JyxSz+J9jhjPe//9x4JznpCzm/JzCHFO9CfONjHIcUqLa9qxqhmBFpr1U5J7vRir4ch7v8TGtGbcR3833HTUA7EEMu/Ca48XVfGNDmySQs8zgGpj1yzf/lBGbiAzTSp7Zp+ANLu+R3NjeiDUYQbgf3vcpoHL44duk4dzhD+ofFD75PF1SMTluWbeLCSENH9io2pxVDj3I5VhlNxHdbqY1WXb+sDBVr4niIGzQiKqVOV33ghyRpzVJFZ7SaQG7VR/mLL3UnvJuapLYtUV9+/7Si/CHl7m8NntPMvx1nM/Z4t/BN8Z5cdhPn2PLxp9f5VCmCqLlCQDSv94cCTLlatiCTfF7axgE0u7+CWiOUNyyqg/vu0pjTwIA==
 593718ff5844cad7a27ee3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9LTazsxR49h3/mH2D1Sdxu6YtCIPE8ggThmveW/dZQy6W1xLfS66pFmDvq8ND0WjDa/Fi9dmjMcQtzA9CZL8AMlSc2aLJs++KjCuN+t6tn/tLhLz1nHaSitqgsIoJmBWb00QjOilnAQq7H8gUpUqMdLyEeL2B9HfJobQx6A8Op2xohjI7qD5gLGAxh+QMmuUmf7wx1h2UuQvrNW5di7S3k3nxfhm87Gkth3j0M/aMy0P6irPOKcKns55r6eOzItC+ezQayXc4A10F+x6Ew==
--- a/.hgtags	Sun Mar 03 20:16:22 2019 +0530
+++ b/.hgtags	Tue Mar 19 16:36:59 2019 +0300
@@ -189,3 +189,4 @@
 197f092b2cd9691e2a55d198f717b231af9be6f9 4.8.2
 593718ff5844cad7a27ee3eb5adad89ac8550949 4.9rc0
 83377b4b4ae0e9a6b8e579f7b0a693b8cf5c3b10 4.9
+4ea21df312ec7159c5b3633096b6ecf68750b0dd 4.9.1
--- a/mercurial/cmdutil.py	Sun Mar 03 20:16:22 2019 +0530
+++ b/mercurial/cmdutil.py	Tue Mar 19 16:36:59 2019 +0300
@@ -7,6 +7,7 @@
 
 from __future__ import absolute_import
 
+import copy as copymod
 import errno
 import os
 import re
@@ -270,6 +271,28 @@
             raise error.Abort(_('cannot partially commit a merge '
                                '(use "hg commit" instead)'))
 
+        status = repo.status(match=match)
+
+        overrides = {(b'ui', b'commitsubrepos'): True}
+
+        with repo.ui.configoverride(overrides, b'record'):
+            # subrepoutil.precommit() modifies the status
+            tmpstatus = scmutil.status(copymod.copy(status[0]),
+                                       copymod.copy(status[1]),
+                                       copymod.copy(status[2]),
+                                       copymod.copy(status[3]),
+                                       copymod.copy(status[4]),
+                                       copymod.copy(status[5]),
+                                       copymod.copy(status[6]))
+
+            # Force allows -X subrepo to skip the subrepo.
+            subs, commitsubs, newstate = subrepoutil.precommit(
+                repo.ui, wctx, tmpstatus, match, force=True)
+            for s in subs:
+                if s in commitsubs:
+                    dirtyreason = wctx.sub(s).dirtyreason(True)
+                    raise error.Abort(dirtyreason)
+
         def fail(f, msg):
             raise error.Abort('%s: %s' % (f, msg))
 
@@ -279,7 +302,6 @@
             match.explicitdir = vdirs.append
             match.bad = fail
 
-        status = repo.status(match=match)
         if not force:
             repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
         diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True,
--- a/tests/test-amend-subrepo.t	Sun Mar 03 20:16:22 2019 +0530
+++ b/tests/test-amend-subrepo.t	Tue Mar 19 16:36:59 2019 +0300
@@ -121,9 +121,22 @@
   $ echo a >> a
   $ hg ci -m3
 
+  $ echo 't = t' > .hgsub
+
+--interactive won't silently ignore dirty subrepos
+
+  $ echo modified > t/b
+  $ hg amend --interactive --config ui.interactive=True
+  abort: uncommitted changes in subrepository "t"
+  [255]
+  $ hg amend --interactive --config ui.interactive=True --config ui.commitsubrepos=True
+  abort: uncommitted changes in subrepository "t"
+  [255]
+
+  $ hg -R t revert -q --all --no-backup
+
 amend with one subrepo dropped
 
-  $ echo 't = t' > .hgsub
   $ hg amend
   saved backup bundle to * (glob) (obsstore-off !)
   $ hg status --change .
--- a/tests/test-https.t	Sun Mar 03 20:16:22 2019 +0530
+++ b/tests/test-https.t	Tue Mar 19 16:36:59 2019 +0300
@@ -2,6 +2,12 @@
 
 Proper https client requires the built-in ssl from Python 2.6.
 
+Disable the system configuration which may set stricter TLS requirements.
+This test expects that legacy TLS versions are supported.
+
+  $ OPENSSL_CONF=
+  $ export OPENSSL_CONF
+
 Make server certificates:
 
   $ CERTSDIR="$TESTDIR/sslcerts"
@@ -633,7 +639,7 @@
 
   $ P="$CERTSDIR" hg id https://localhost:$HGPORT/
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  abort: error: *handshake failure* (glob)
+  abort: error: .*(\$ECONNRESET\$|certificate required|handshake failure).* (re)
   [255]
 
 with client certificate:
--- a/tests/test-mq-subrepo.t	Sun Mar 03 20:16:22 2019 +0530
+++ b/tests/test-mq-subrepo.t	Tue Mar 19 16:36:59 2019 +0300
@@ -295,16 +295,6 @@
   A .hgsub
   A sub/a
   % qrecord --config ui.interactive=1 -m0 0.diff
-  diff --git a/.hgsub b/.hgsub
-  new file mode 100644
-  examine changes to '.hgsub'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +sub = sub
-  record this change to '.hgsub'? [Ynesfdaq?] y
-  
-  warning: subrepo spec file '.hgsub' not found
-  warning: subrepo spec file '.hgsub' not found
   abort: uncommitted changes in subrepository "sub"
   [255]
   % update substate when adding .hgsub w/clean updated subrepo
@@ -333,15 +323,6 @@
   M .hgsub
   A sub2/a
   % qrecord --config ui.interactive=1 -m1 1.diff
-  diff --git a/.hgsub b/.hgsub
-  1 hunks, 1 lines changed
-  examine changes to '.hgsub'? [Ynesfdaq?] y
-  
-  @@ -1,1 +1,2 @@
-   sub = sub
-  +sub2 = sub2
-  record this change to '.hgsub'? [Ynesfdaq?] y
-  
   abort: uncommitted changes in subrepository "sub2"
   [255]
   % update substate when modifying .hgsub w/clean updated subrepo