# HG changeset patch # User Raphaël Gomès # Date 1666618334 -7200 # Node ID a3356ab610fc50000cf0ba55c424a4d96da11db7 # Parent 192949b6815923cc3438999dc27f4bca5ddaafb9# Parent 52dd7a43ad5c008121910b71ce6fe838a22029b7 branching: merge default into stable This marks the feature freeze for the 6.3 release diff -r 52dd7a43ad5c -r a3356ab610fc hgext/lfs/blobstore.py --- a/hgext/lfs/blobstore.py Wed Oct 19 16:16:47 2022 -0400 +++ b/hgext/lfs/blobstore.py Mon Oct 24 15:32:14 2022 +0200 @@ -170,7 +170,7 @@ # the localstore, because it's not going to match the expected. if content_length is not None and int(content_length) != size: msg = ( - b"Response length (%s) does not match Content-Length " + b"Response length (%d) does not match Content-Length " b"header (%d): likely server-side crash" ) raise LfsRemoteError(_(msg) % (size, int(content_length))) diff -r 52dd7a43ad5c -r a3356ab610fc mercurial/configitems.py --- a/mercurial/configitems.py Wed Oct 19 16:16:47 2022 -0400 +++ b/mercurial/configitems.py Mon Oct 24 15:32:14 2022 +0200 @@ -2569,7 +2569,7 @@ coreconfigitem( b'verify', b'skipflags', - default=None, + default=0, ) coreconfigitem( b'web', diff -r 52dd7a43ad5c -r a3356ab610fc mercurial/shelve.py --- a/mercurial/shelve.py Wed Oct 19 16:16:47 2022 -0400 +++ b/mercurial/shelve.py Mon Oct 24 15:32:14 2022 +0200 @@ -425,7 +425,7 @@ def _aborttransaction(repo, tr): """Abort current transaction for shelve/unshelve, but keep dirstate""" dirstatebackupname = b'dirstate.shelve' - repo.dirstate.savebackup(tr, dirstatebackupname) + repo.dirstate.savebackup(None, dirstatebackupname) tr.abort() repo.dirstate.restorebackup(None, dirstatebackupname) diff -r 52dd7a43ad5c -r a3356ab610fc mercurial/windows.py --- a/mercurial/windows.py Wed Oct 19 16:16:47 2022 -0400 +++ b/mercurial/windows.py Mon Oct 24 15:32:14 2022 +0200 @@ -581,7 +581,13 @@ If uid is None, return the name of the current user.""" if not uid: - return pycompat.fsencode(getpass.getuser()) + try: + return pycompat.fsencode(getpass.getuser()) + except ModuleNotFoundError: + # getpass.getuser() checks for a few environment variables first, + # but if those aren't set, imports pwd and calls getpwuid(), none of + # which exists on Windows. + pass return None diff -r 52dd7a43ad5c -r a3356ab610fc tests/common-pattern.py --- a/tests/common-pattern.py Wed Oct 19 16:16:47 2022 -0400 +++ b/tests/common-pattern.py Mon Oct 24 15:32:14 2022 +0200 @@ -158,6 +158,7 @@ br'$EADDRNOTAVAIL$': ( # strerror() br'Cannot assign requested address', + br'Can\'t assign requested address', # FormatMessage(WSAEADDRNOTAVAIL) ), } diff -r 52dd7a43ad5c -r a3356ab610fc tests/test-https.t --- a/tests/test-https.t Wed Oct 19 16:16:47 2022 -0400 +++ b/tests/test-https.t Mon Oct 24 15:32:14 2022 +0200 @@ -495,7 +495,7 @@ $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure https://localhost:0/ pulling from https://localhost:0/ - abort: error: Tunnel connection failed: 404 Connection refused + abort: error: Tunnel connection failed: 404 (Connection refused|\$EADDRNOTAVAIL\$) (re) [100] diff -r 52dd7a43ad5c -r a3356ab610fc tests/test-issue1102.t --- a/tests/test-issue1102.t Wed Oct 19 16:16:47 2022 -0400 +++ b/tests/test-issue1102.t Mon Oct 24 15:32:14 2022 +0200 @@ -14,4 +14,18 @@ tip 3:a49829c4fc11 t1 0:f7b1eb17ad24 +Ensure that the username access fails gracefully if assumptions about the +environment made by python do not hold. + +#if windows + >>> import os + >>> from mercurial import util + >>> os.environ.pop('LOGNAME', None) and None + >>> os.environ.pop('USER', None) and None + >>> os.environ.pop('LNAME', None) and None + >>> os.environ.pop('USERNAME', None) and None + >>> print(util.username()) + None +#endif + $ cd .. diff -r 52dd7a43ad5c -r a3356ab610fc tests/test-shelve.t --- a/tests/test-shelve.t Wed Oct 19 16:16:47 2022 -0400 +++ b/tests/test-shelve.t Mon Oct 24 15:32:14 2022 +0200 @@ -1,4 +1,14 @@ #testcases stripbased phasebased +#testcases dirstate-v1 dirstate-v2 + +#if dirstate-v2 + $ cat >> $HGRCPATH << EOF + > [format] + > use-dirstate-v2=1 + > [storage] + > dirstate-v2.slow-path=allow + > EOF +#endif $ cat <> $HGRCPATH > [extensions] diff -r 52dd7a43ad5c -r a3356ab610fc tests/test-shelve2.t --- a/tests/test-shelve2.t Wed Oct 19 16:16:47 2022 -0400 +++ b/tests/test-shelve2.t Mon Oct 24 15:32:14 2022 +0200 @@ -1,6 +1,16 @@ #testcases stripbased phasebased #testcases abortflag abortcommand #testcases continueflag continuecommand +#testcases dirstate-v1 dirstate-v2 + +#if dirstate-v2 + $ cat >> $HGRCPATH << EOF + > [format] + > use-dirstate-v2=1 + > [storage] + > dirstate-v2.slow-path=allow + > EOF +#endif $ cat <> $HGRCPATH > [extensions]