# HG changeset patch # User Martin von Zweigbergk # Date 2017-05-12 18:20:25 # Node ID 3a755652ce3afab761af1804d0665a45c350b01f # Parent 3de4c61b50870668bbbe4da0a9a2cd5f7f42fbfe # Parent 176ed32dc159b63a8edd1fd9faaba90bc7d924a6 merge with stable diff --git a/contrib/wix/help.wxs b/contrib/wix/help.wxs --- a/contrib/wix/help.wxs +++ b/contrib/wix/help.wxs @@ -40,7 +40,7 @@ - + diff --git a/hgext/churn.py b/hgext/churn.py --- a/hgext/churn.py +++ b/hgext/churn.py @@ -133,7 +133,7 @@ def churn(ui, repo, *pats, **opts): 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 diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py --- a/hgext/largefiles/uisetup.py +++ b/hgext/largefiles/uisetup.py @@ -21,6 +21,7 @@ from mercurial import ( cmdutil, commands, copies, + debugcommands, exchange, extensions, filemerge, @@ -39,6 +40,11 @@ from . import ( ) 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 diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -155,7 +155,8 @@ funcs = '''os.path.join os.path.split os # 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''' diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2308,7 +2308,9 @@ def _dograft(ui, repo, *revs, **opts): # 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: diff --git a/mercurial/help/merge-tools.txt b/mercurial/help/merge-tools.txt --- a/mercurial/help/merge-tools.txt +++ b/mercurial/help/merge-tools.txt @@ -70,7 +70,7 @@ 6. If a program named ``hgmerge`` can be 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:: diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py --- a/mercurial/sslutil.py +++ b/mercurial/sslutil.py @@ -825,7 +825,7 @@ def validatesocket(sock): '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 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -247,7 +247,7 @@ def gethgversion(): 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)) diff --git a/tests/test-graft.t b/tests/test-graft.t --- a/tests/test-graft.t +++ b/tests/test-graft.t @@ -1307,4 +1307,48 @@ Graft a change into a new file previousl $ 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 .. diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1831,7 +1831,7 @@ Test dynamic list of merge tools only sh 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 diff --git a/tests/test-https.t b/tests/test-https.t --- a/tests/test-https.t +++ b/tests/test-https.t @@ -372,7 +372,7 @@ Fingerprints - 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 @@ Fingerprints - 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 @@ Fingerprints - 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 @@ Fingerprints - 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 @@ Test https with cacert and fingerprint t $ 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 diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -212,6 +212,25 @@ Test display of largefiles in hgweb $ killdaemons.py #endif +Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail) + + $ cat < "$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.