merge with stable
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 May 2017 11:20:25 -0700
changeset 32245 3a755652ce3a
parent 32244 3de4c61b5087 (current diff)
parent 32207 176ed32dc159 (diff)
child 32246 7e79373263ab
merge with stable
hgext/win32mbcs.py
mercurial/commands.py
tests/hghave.py
tests/test-graft.t
tests/test-https.t
--- a/contrib/wix/help.wxs	Tue May 09 21:27:06 2017 -0700
+++ b/contrib/wix/help.wxs	Fri May 12 11:20:25 2017 -0700
@@ -40,7 +40,7 @@
         <Directory Id="help.internaldir" Name="internals">
           <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
             <File Id="internals.bundles.txt"      Name="bundles.txt" KeyPath="yes" />
-            <File Id="internals.censor.txt"       Name="censor.txt" KeyPath="yes" />
+            <File Id="internals.censor.txt"       Name="censor.txt" />
             <File Id="internals.changegroups.txt" Name="changegroups.txt" />
             <File Id="internals.requirements.txt" Name="requirements.txt" />
             <File Id="internals.revlogs.txt"      Name="revlogs.txt" />
--- a/hgext/churn.py	Tue May 09 21:27:06 2017 -0700
+++ b/hgext/churn.py	Fri May 12 11:20:25 2017 -0700
@@ -133,7 +133,7 @@
     Examples::
 
       # display count of changed lines for every committer
-      hg churn -t "{author|email}"
+      hg churn -T "{author|email}"
 
       # display daily activity graph
       hg churn -f "%H" -s -c
--- a/hgext/largefiles/uisetup.py	Tue May 09 21:27:06 2017 -0700
+++ b/hgext/largefiles/uisetup.py	Fri May 12 11:20:25 2017 -0700
@@ -21,6 +21,7 @@
     cmdutil,
     commands,
     copies,
+    debugcommands,
     exchange,
     extensions,
     filemerge,
@@ -39,6 +40,11 @@
 )
 
 def uisetup(ui):
+    # TODO: debugcommands should use a separate command table
+    # Side-effect of accessing is debugcommands module is guaranteed to be
+    # imported and commands.table is populated.
+    debugcommands.command
+
     # Disable auto-status for some commands which assume that all
     # files in the result are under Mercurial's control
 
--- a/hgext/win32mbcs.py	Tue May 09 21:27:06 2017 -0700
+++ b/hgext/win32mbcs.py	Fri May 12 11:20:25 2017 -0700
@@ -155,7 +155,8 @@
 # These functions are required to be called with local encoded string
 # because they expects argument is local encoded string and cause
 # problem with unicode string.
-rfuncs = '''mercurial.encoding.upper mercurial.encoding.lower'''
+rfuncs = '''mercurial.encoding.upper mercurial.encoding.lower
+ mercurial.pycompat.bytestr'''
 
 # List of Windows specific functions to be wrapped.
 winfuncs = '''os.path.splitunc'''
--- a/mercurial/commands.py	Tue May 09 21:27:06 2017 -0700
+++ b/mercurial/commands.py	Fri May 12 11:20:25 2017 -0700
@@ -2308,7 +2308,9 @@
         # check ancestors for earlier grafts
         ui.debug('scanning for duplicate grafts\n')
 
-        for rev in repo.changelog.findmissingrevs(revs, [crev]):
+        # The only changesets we can be sure doesn't contain grafts of any
+        # revs, are the ones that are common ancestors of *all* revs:
+        for rev in repo.revs('only(%d,ancestor(%ld))', crev, revs):
             ctx = repo[rev]
             n = ctx.extra().get('source')
             if n in ids:
--- a/mercurial/help/merge-tools.txt	Tue May 09 21:27:06 2017 -0700
+++ b/mercurial/help/merge-tools.txt	Fri May 12 11:20:25 2017 -0700
@@ -70,7 +70,7 @@
 7. If the file to be merged is not binary and is not a symlink, then
    internal ``:merge`` is used.
 
-8. The merge of the file fails and must be resolved before commit.
+8. Otherwise, ``:prompt`` is used.
 
 .. note::
 
--- a/mercurial/sslutil.py	Tue May 09 21:27:06 2017 -0700
+++ b/mercurial/sslutil.py	Fri May 12 11:20:25 2017 -0700
@@ -825,7 +825,7 @@
                               'remove the old one from [hostfingerprints] '
                               'to upgrade to a more secure SHA-256 '
                               'fingerprint: '
-                              '%s.fingerprints=%s)\n') % (
+                              '%s:fingerprints=%s)\n') % (
                                   host, host, nicefingerprint))
                 return
 
--- a/tests/hghave.py	Tue May 09 21:27:06 2017 -0700
+++ b/tests/hghave.py	Fri May 12 11:20:25 2017 -0700
@@ -247,7 +247,7 @@
     return (int(m.group(1)), int(m.group(2)))
 
 @checkvers("hg", "Mercurial >= %s",
-            list([(1.0 * x) / 10 for x in range(9, 40)]))
+            list([(1.0 * x) / 10 for x in range(9, 99)]))
 def has_hg_range(v):
     major, minor = v.split('.')[0:2]
     return gethgversion() >= (int(major), int(minor))
--- a/tests/test-graft.t	Tue May 09 21:27:06 2017 -0700
+++ b/tests/test-graft.t	Fri May 12 11:20:25 2017 -0700
@@ -1307,4 +1307,48 @@
   $ hg status --change .
   M b/x
 
+Prepare for test of skipped changesets and how merges can influence it:
+
+  $ hg merge -q -r 1 --tool :local
+  $ hg ci -m m
+  $ echo xx >> b/x
+  $ hg ci -m xx
+
+  $ hg log -G -T '{rev} {desc|firstline}'
+  @  7 xx
+  |
+  o    6 m
+  |\
+  | o  5 y
+  | |
+  +---o  4 y
+  | |
+  | o  3 x
+  | |
+  | o  2 b
+  | |
+  o |  1 x
+  |/
+  o  0 a
+  
+Grafting of plain changes correctly detects that 3 and 5 should be skipped:
+
+  $ hg up -qCr 4
+  $ hg graft --tool :local -r 2::5
+  skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a)
+  skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1)
+  grafting 2:42127f193bcd "b"
+
+Extending the graft range to include a (skipped) merge of 3 will not prevent us from
+also detecting that both 3 and 5 should be skipped:
+
+  $ hg up -qCr 4
+  $ hg graft --tool :local -r 2::7
+  skipping ungraftable merge revision 6
+  skipping already grafted revision 3:ca093ca2f1d9 (was grafted from 1:13ec5badbf2a)
+  skipping already grafted revision 5:43e9eb70dab0 (was grafted from 4:6c9a1289e5f1)
+  grafting 2:42127f193bcd "b"
+  grafting 7:d3c3f2b38ecc "xx"
+  note: graft of 7:d3c3f2b38ecc created no changes to commit
+
   $ cd ..
--- a/tests/test-help.t	Tue May 09 21:27:06 2017 -0700
+++ b/tests/test-help.t	Fri May 12 11:20:25 2017 -0700
@@ -1831,7 +1831,7 @@
          but it will by default not be used for symlinks and binary files.
       7. If the file to be merged is not binary and is not a symlink, then
          internal ":merge" is used.
-      8. The merge of the file fails and must be resolved before commit.
+      8. Otherwise, ":prompt" is used.
   
       Note:
          After selecting a merge program, Mercurial will by default attempt to
--- a/tests/test-https.t	Tue May 09 21:27:06 2017 -0700
+++ b/tests/test-https.t	Fri May 12 11:20:25 2017 -0700
@@ -372,7 +372,7 @@
 - works without cacerts (hostfingerprints)
   $ hg -R copy-pull id https://localhost:$HGPORT/ --insecure --config hostfingerprints.localhost=ec:d8:7c:d6:b3:86:d0:4f:c1:b8:b4:1c:9d:8f:5e:16:8e:ef:1c:03
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost.fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
+  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
   5fed3813f7f5
 
 - works without cacerts (hostsecurity)
@@ -387,7 +387,7 @@
 - multiple fingerprints specified and first matches
   $ hg --config 'hostfingerprints.localhost=ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03, deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/ --insecure
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost.fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
+  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
   5fed3813f7f5
 
   $ hg --config 'hostsecurity.localhost:fingerprints=sha1:ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03, sha1:deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' -R copy-pull id https://localhost:$HGPORT/
@@ -397,7 +397,7 @@
 - multiple fingerprints specified and last matches
   $ hg --config 'hostfingerprints.localhost=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03' -R copy-pull id https://localhost:$HGPORT/ --insecure
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost.fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
+  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
   5fed3813f7f5
 
   $ hg --config 'hostsecurity.localhost:fingerprints=sha1:deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, sha1:ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03' -R copy-pull id https://localhost:$HGPORT/
@@ -429,7 +429,7 @@
 - ignores that certificate doesn't match hostname
   $ hg -R copy-pull id https://$LOCALIP:$HGPORT/ --config hostfingerprints.$LOCALIP=ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03
   warning: connecting to $LOCALIP using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  (SHA-1 fingerprint for $LOCALIP found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: $LOCALIP.fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
+  (SHA-1 fingerprint for $LOCALIP found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: $LOCALIP:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
   5fed3813f7f5
 
 Ports used by next test. Kill servers.
@@ -568,7 +568,7 @@
   $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://localhost:$HGPORT/ --config hostfingerprints.localhost=ecd87cd6b386d04fc1b8b41c9d8f5e168eef1c03 --trace
   pulling from https://*:$HGPORT/ (glob)
   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
-  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost.fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
+  (SHA-1 fingerprint for localhost found in legacy [hostfingerprints] section; if you trust this fingerprint, set the following config value in [hostsecurity] and remove the old one from [hostfingerprints] to upgrade to a more secure SHA-256 fingerprint: localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e)
   searching for changes
   no changes found
 
--- a/tests/test-largefiles.t	Tue May 09 21:27:06 2017 -0700
+++ b/tests/test-largefiles.t	Fri May 12 11:20:25 2017 -0700
@@ -212,6 +212,25 @@
   $ killdaemons.py
 #endif
 
+Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
+
+  $ cat <<EOF > "$TESTTMP/hgweb.cgi"
+  > #!/usr/bin/env python
+  > from mercurial import demandimport; demandimport.enable()
+  > from mercurial.hgweb import hgweb
+  > from mercurial.hgweb import wsgicgi
+  > application = hgweb('.', 'test repo')
+  > wsgicgi.launch(application)
+  > EOF
+
+  $ PATH_INFO='/' \
+  > QUERY_STRING='' \
+  > REQUEST_METHOD='GET' \
+  > SCRIPT_NAME='' \
+  > SERVER_NAME='localhost' \
+  > SERVER_PORT='80' \
+  > python "$TESTTMP/hgweb.cgi" > /dev/null
+
 Test archiving the various revisions.  These hit corner cases known with
 archiving.