D9378: errors: remove trailing "!" from some error messages for consistency
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Some types of exceptions had a trailing "!" printed after the message from the exception itself. I guess some of these errors seem a little more severe (?), but it seems more likely that the inconsistency was just an oversight. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9378 AFFECTED FILES mercurial/scmutil.py tests/test-alias.t tests/test-bheads.t tests/test-bookmarks-current.t tests/test-bookmarks-pushpull.t tests/test-bookmarks.t tests/test-branch-change.t tests/test-branch-option.t tests/test-bundle-r.t tests/test-bundle.t tests/test-clone.t tests/test-commandserver.t tests/test-commit.t tests/test-committer.t tests/test-convert-filemap.t tests/test-default-push.t tests/test-directaccess.t tests/test-dispatch.t tests/test-export.t tests/test-flagprocessor.t tests/test-globalopts.t tests/test-glog-beautifygraph.t tests/test-glog.t tests/test-grep.t tests/test-hook.t tests/test-http-bad-server.t tests/test-i18n.t tests/test-identify.t tests/test-infinitepush-ci.t tests/test-init.t tests/test-journal-exists.t tests/test-largefiles-misc.t tests/test-largefiles.t tests/test-legacy-exit-code.t tests/test-lfconvert.t tests/test-lfs-serve-access.t tests/test-lfs-serve.t tests/test-lfs-test-server.t tests/test-lfs.t tests/test-log.t tests/test-logexchange.t tests/test-manifest.t tests/test-mq-qdelete.t tests/test-mq-qrefresh.t tests/test-mq.t tests/test-narrow-clone.t tests/test-narrow-exchange.t tests/test-obshistory.t tests/test-obsolete-distributed.t tests/test-obsolete.t tests/test-patchbomb.t tests/test-pull-bundle.t tests/test-pull-r.t tests/test-pull.t tests/test-push.t tests/test-rebase-dest.t tests/test-remotefilelog-repack.t tests/test-repo-compengines.t tests/test-requires.t tests/test-revisions.t tests/test-revlog-v2.t tests/test-revlog.t tests/test-revset-legacy-lookup.t tests/test-revset-outgoing.t tests/test-revset.t tests/test-revset2.t tests/test-share.t tests/test-sparse-requirement.t tests/test-ssh-bundle1.t tests/test-ssh-proto.t tests/test-ssh-repoerror.t tests/test-ssh.t tests/test-static-http.t tests/test-strip.t tests/test-subrepo-recursion.t tests/test-subrepo.t tests/test-template-functions.t tests/test-treediscovery-legacy.t tests/test-update-branches.t tests/test-username-newline.t tests/test-wireproto-caching.t tests/test-wireproto-command-changesetdata.t tests/test-wireproto-command-filedata.t tests/test-wireproto-command-filesdata.t tests/test-wireproto-command-manifestdata.t tests/test-wireproto-command-rawstorefiledata.t CHANGE DETAILS diff --git a/tests/test-wireproto-command-rawstorefiledata.t b/tests/test-wireproto-command-rawstorefiledata.t --- a/tests/test-wireproto-command-rawstorefiledata.t +++ b/tests/test-wireproto-command-rawstorefiledata.t @@ -31,7 +31,7 @@ > EOF creating http peer for wire protocol version 2 sending rawstorefiledata command - abort: missing required arguments: files! + abort: missing required arguments: files [255] Unknown files value results in error @@ -42,7 +42,7 @@ > EOF creating http peer for wire protocol version 2 sending rawstorefiledata command - abort: unknown file type: unknown! + abort: unknown file type: unknown [255] Requesting just changelog works diff --git a/tests/test-wireproto-command-manifestdata.t b/tests/test-wireproto-command-manifestdata.t --- a/tests/test-wireproto-command-manifestdata.t +++ b/tests/test-wireproto-command-manifestdata.t @@ -49,7 +49,7 @@ > EOF creating http peer for wire protocol version 2 sending manifestdata command - abort: missing required arguments: nodes, tree! + abort: missing required arguments: nodes, tree [255] $ sendhttpv2peer << EOF @@ -58,7 +58,7 @@ > EOF creating http peer for wire protocol version 2 sending manifestdata command - abort: missing required arguments: tree! + abort: missing required arguments: tree [255] Unknown node is an error @@ -70,7 +70,7 @@ > EOF creating http peer for wire protocol version 2 sending manifestdata command - abort: unknown node: \xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa! (esc) + abort: unknown node: \xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa (esc) [255] Fetching a single revision returns just metadata by default diff --git a/tests/test-wireproto-command-filesdata.t b/tests/test-wireproto-command-filesdata.t --- a/tests/test-wireproto-command-filesdata.t +++ b/tests/test-wireproto-command-filesdata.t @@ -71,7 +71,7 @@ > EOF creating http peer for wire protocol version 2 sending
D9380: errors: remove trailing "!" in messages about creating new heads on push
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9380 AFFECTED FILES mercurial/discovery.py tests/test-bookflow.t tests/test-bookmarks-pushpull.t tests/test-exchange-obsmarkers-case-A3.t tests/test-obsolete-checkheads.t tests/test-phases-exchange.t tests/test-push-checkheads-multibranches-E3.t tests/test-push-checkheads-partial-C1.t tests/test-push-checkheads-partial-C2.t tests/test-push-checkheads-partial-C3.t tests/test-push-checkheads-partial-C4.t tests/test-push-checkheads-unpushed-D1.t tests/test-push-checkheads-unpushed-D2.t tests/test-push-checkheads-unpushed-D3.t tests/test-push-checkheads-unpushed-D4.t tests/test-push-checkheads-unpushed-D5.t tests/test-push-checkheads-unpushed-D6.t tests/test-push-warn.t tests/test-push.t tests/test-subrepo.t tests/test-treediscovery-legacy.t tests/test-treediscovery.t CHANGE DETAILS diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t --- a/tests/test-treediscovery.t +++ b/tests/test-treediscovery.t @@ -269,7 +269,7 @@ $ hg push $remote pushing to http://localhost:$HGPORT/ searching for changes - abort: push creates new remote branches: both, name1! + abort: push creates new remote branches: both, name1 (use 'hg push --new-branch' to create new remote branches) [255] $ hg push $remote --new-branch diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t --- a/tests/test-treediscovery-legacy.t +++ b/tests/test-treediscovery-legacy.t @@ -285,7 +285,7 @@ $ hg push $remote pushing to http://localhost:$HGPORT/ searching for changes - abort: push creates new remote branches: both, name1! + abort: push creates new remote branches: both, name1 (use 'hg push --new-branch' to create new remote branches) [255] $ hg push $remote --new-branch diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -571,7 +571,7 @@ no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss pushing subrepo s to $TESTTMP/t/s searching for changes - abort: push creates new remote head 12a213df6fa9! (in subrepository "s") + abort: push creates new remote head 12a213df6fa9 (in subrepository "s") (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push -f @@ -1013,7 +1013,7 @@ created new head $ hg -R repo2 ci -m3 $ hg -q -R repo2 push - abort: push creates new remote head cc505f09a8b2! (in subrepository "s") + abort: push creates new remote head cc505f09a8b2 (in subrepository "s") (merge or see 'hg help push' for details about pushing new heads) [255] $ hg -R repo update diff --git a/tests/test-push.t b/tests/test-push.t --- a/tests/test-push.t +++ b/tests/test-push.t @@ -385,7 +385,7 @@ $ hg push -b default pushing to $TESTTMP/test-require-revs-dest searching for changes - abort: push creates new remote head [0-9a-f]+! (re) + abort: push creates new remote head [0-9a-f]+ (re) (merge or see 'hg help push' for details about pushing new heads) [255] (demonstrate that even though we don't have anything to exchange, we're still diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t --- a/tests/test-push-warn.t +++ b/tests/test-push-warn.t @@ -31,7 +31,7 @@ pushing to ../a searching for changes remote has heads on branch 'default' that are not known locally: 1c9246a22a0a - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -49,7 +49,7 @@ remote has heads on branch 'default' that are not known locally: 1c9246a22a0a new remote heads on branch 'default': 1e108cc5548c - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (pull and merge or see 'hg help push' for details about pushing new heads) [255] @@ -66,7 +66,7 @@ $ hg push ../a pushing to ../a searching for changes - abort: push creates new remote head 1e108cc5548c! + abort: push creates new remote head 1e108cc5548c (merge or see 'hg help push' for details about pushing new heads) [255] @@ -119,7 +119,7 @@ $ hg push ../c pushing to ../c searching for changes - abort: push creates new remote head 6346d66eb9f5! + abort: push creates new remote head 6346d66eb9f5 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -132,7 +132,7 @@ $ hg push -r 3 ../c pushing to ../c searching for changes - abort: push creates new remote head a5dda829a167! + abort: push creates new remote head a5dda829a167 (merge or see 'hg help push' for details about pushing new heads) [255] @@ -142,7 +142,7 @@ new remote heads on branch
D9379: errors: consistently don't use trailing "!" in "not found in manifest" message
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We already had some places with the same message without the trailing "!". REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9379 AFFECTED FILES mercurial/commands.py tests/test-parents.t tests/test-remotefilelog-prefetch.t CHANGE DETAILS diff --git a/tests/test-remotefilelog-prefetch.t b/tests/test-remotefilelog-prefetch.t --- a/tests/test-remotefilelog-prefetch.t +++ b/tests/test-remotefilelog-prefetch.t @@ -239,7 +239,7 @@ .. hopefully this flakyness is not hiding any actual bug. $ hg revert -a -r 1 || true ? files fetched over 1 fetches - (? misses, 0.00% hit ratio) over * (glob) - abort: z2@109c3a557a73: not found in manifest! (?) + abort: z2@109c3a557a73: not found in manifest (?) $ find $CACHEDIR -type f | sort $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a diff --git a/tests/test-parents.t b/tests/test-parents.t --- a/tests/test-parents.t +++ b/tests/test-parents.t @@ -53,7 +53,7 @@ $ hg parents -r 3 c - abort: 'c' not found in manifest! + abort: 'c' not found in manifest [10] $ hg parents -r 2 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4999,7 +4999,7 @@ except error.LookupError: pass if not filenodes: -raise error.InputError(_(b"'%s' not found in manifest!") % file_) +raise error.InputError(_(b"'%s' not found in manifest") % file_) p = [] for fn in filenodes: fctx = repo.filectx(file_, fileid=fn) To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9381: errors: remove trailing "!" in messages about bad top-level args
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9381 AFFECTED FILES mercurial/dispatch.py tests/test-dispatch.t tests/test-globalopts.t CHANGE DETAILS diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t --- a/tests/test-globalopts.t +++ b/tests/test-globalopts.t @@ -134,22 +134,22 @@ earlygetopt with illegal abbreviations: $ hg --confi "foo.bar=baz" - abort: option --config may not be abbreviated! + abort: option --config may not be abbreviated [255] $ hg --cw a tip - abort: option --cwd may not be abbreviated! + abort: option --cwd may not be abbreviated [255] $ hg --rep a tip - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] $ hg --repositor a tip - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] $ hg -qR a tip - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] $ hg -qRa tip - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] Testing --cwd: diff --git a/tests/test-dispatch.t b/tests/test-dispatch.t --- a/tests/test-dispatch.t +++ b/tests/test-dispatch.t @@ -62,20 +62,20 @@ Unparsable form of early options: $ hg cat --debugg - abort: option --debugger may not be abbreviated! + abort: option --debugger may not be abbreviated [255] Parsing failure of early options should be detected before executing the command: $ hg log -b '--config=hooks.pre-log=false' default - abort: option --config may not be abbreviated! + abort: option --config may not be abbreviated [255] $ hg log -b -R. default - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] $ hg log --cwd .. -b --cwd=. default - abort: option --cwd may not be abbreviated! + abort: option --cwd may not be abbreviated [255] However, we can't prevent it from loading extensions and configs: @@ -85,7 +85,7 @@ > EOF $ hg log -b '--config=extensions.bad=bad.py' default *** failed to import extension bad from bad.py: bad - abort: option --config may not be abbreviated! + abort: option --config may not be abbreviated [255] $ mkdir -p badrepo/.hg @@ -113,7 +113,7 @@ [255] $ hg log -b '--config=defaults.log=--config=hooks.pre-log=false' - abort: option --config may not be abbreviated! + abort: option --config may not be abbreviated [255] Shell aliases bypass any command parsing rules but for the early one: @@ -143,13 +143,13 @@ [255] $ HGPLAIN=+strictflags hg log --config='hooks.pre-log=false' -b default - abort: option --config may not be abbreviated! + abort: option --config may not be abbreviated [255] $ HGPLAIN=+strictflags hg log -q --cwd=.. -b default - abort: option --cwd may not be abbreviated! + abort: option --cwd may not be abbreviated [255] $ HGPLAIN=+strictflags hg log -q -R . -b default - abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! + abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo [255] $ HGPLAIN=+strictflags hg --config='hooks.pre-log=false' log -b default diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -1058,18 +1058,18 @@ req.canonical_command = cmd if options[b"config"] != req.earlyoptions[b"config"]: -raise error.Abort(_(b"option --config may not be abbreviated!")) +raise error.Abort(_(b"option --config may not be abbreviated")) if options[b"cwd"] != req.earlyoptions[b"cwd"]: -raise error.Abort(_(b"option --cwd may not be abbreviated!")) +raise error.Abort(_(b"option --cwd may not be abbreviated")) if options[b"repository"] != req.earlyoptions[b"repository"]: raise
D9382: errors: drop trailing "!" for some errors about bookmarks
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9382 AFFECTED FILES mercurial/exchange.py tests/test-bookmarks-pushpull.t CHANGE DETAILS diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -1166,7 +1166,7 @@ searching for changes no changes found pushkey-abort: prepushkey hook exited with status 1 - abort: exporting bookmark @ failed! + abort: exporting bookmark @ failed [255] #endif @@ -1194,7 +1194,7 @@ searching for changes no changes found remote: pushkey-abort: prepushkey hook exited with status 1 - abort: exporting bookmark @ failed! + abort: exporting bookmark @ failed [255] $ hg -R ../issue4455-dest/ bookmarks @@ -1205,7 +1205,7 @@ searching for changes no changes found remote: pushkey-abort: prepushkey hook exited with status 1 - exporting bookmark @ failed! + exporting bookmark @ failed [1] #endif @@ -1233,7 +1233,7 @@ searching for changes no changes found remote: pushkey-abort: prepushkey hook exited with status 1 - abort: exporting bookmark @ failed! + abort: exporting bookmark @ failed [255] $ hg -R ../issue4455-dest/ bookmarks @@ -1244,7 +1244,7 @@ searching for changes no changes found remote: pushkey-abort: prepushkey hook exited with status 1 - exporting bookmark @ failed! + exporting bookmark @ failed [1] #endif @@ -1324,7 +1324,7 @@ searching for changes no changes found remote: pushkey-abort: prepushkey.no-bm-move hook exited with status 1 - abort: updating bookmark foo failed! + abort: updating bookmark foo failed [255] #endif #if b2-binary diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -355,15 +355,15 @@ bookmsgmap = { b'update': ( _(b"updating bookmark %s\n"), -_(b'updating bookmark %s failed!\n'), +_(b'updating bookmark %s failed\n'), ), b'export': ( _(b"exporting bookmark %s\n"), -_(b'exporting bookmark %s failed!\n'), +_(b'exporting bookmark %s failed\n'), ), b'delete': ( _(b"deleting remote bookmark %s\n"), -_(b'deleting remote bookmark %s failed!\n'), +_(b'deleting remote bookmark %s failed\n'), ), } To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Integration tests: mercurial-testhelpers
Hi, I've updated recently the Integration Tests Plan [1] with what has been said during the 5.6 sprint (from the pad) and more ideas and realizations. ## mercurial-testhelpers Then, I've extracted my helpers as the `mercurial-testhelpers` separate package [2]. The main driving reason is that even if it went straight to the core right now, extension authors wouldn't be able to use it until they drop support for hg 5.6. For some, that would mean at least a few years… mercurial-testhelpers is usable right now by extensions and other downstreams. It comes with examples for the core [3], hg-evolve and hg-git and is of course entirely tested using itself, with CI etc. It is compatible down to at least hg 4.3 (I didn't try further). Just to say how committed I am about it, all the Python testing of Heptapod relies on it. I must add that its introduction was a tipping point in development. ## core submission coming soon That extraction already had me remove some specifics – and provide means for projects that need them to add them back. As a result, I feel now ready to start submitting code to the core. I've explained some of the choices in the README [4]. Even if it's quite small, I'm not sure how to cut it in smaller reviewable chunks, but I wouldn't probably start by hooking it in `run-tests.py`, that's not what I'm the most at ease with. I'd simply tell people to install and run pytest manually in the first drafts [5] if that's ok. Guidance and feedback would be much appreciated! I've had a chat with Jörg today about the dreadful `test-http-bad-server.t`, will experiment later this week or the next to see if I can make something equivalent and more maintainable out of it. Best, [1] https://www.mercurial-scm.org/wiki/IntegrationTestsPlan [2] https://pypi.org/project/mercurial-testhelpers and https://foss.heptapod.net/mercurial/testhelpers [3] the core example is the exact same translation of test-revset.t I've prepared for the sprint (needs to be split into separate concerns and completed), plus a Python test copied over to check that launching it with pytest works (it does). [4] https://foss.heptapod.net/mercurial/testhelpers/-/blob/branch/default/README.md [5] of course, that means not removing any existing case until it's run by the main runner automatically. -- Georges Racinet https://octobus.net, https://about.heptapod.host, https://heptapod.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9376: tests: update test-https.t's #no-defaultcacertsloaded block with new exit code
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm pretty sure I broke this in https://phab.mercurial-scm.org/D9309. It was reported by the Heptapod CI. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9376 AFFECTED FILES tests/test-https.t CHANGE DETAILS diff --git a/tests/test-https.t b/tests/test-https.t --- a/tests/test-https.t +++ b/tests/test-https.t @@ -52,7 +52,7 @@ $ hg clone https://localhost:$HGPORT/ copy-pull (an attempt was made to load CA certificates but none were loaded; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error) abort: error: *certificate verify failed* (glob) - [255] + [100] #endif #if defaultcacertsloaded To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9377: tests: make test-worker.t pass on py2
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I broke the py2 version in https://phab.mercurial-scm.org/D9287 because the `WorkerError.__bytes__()` (or `.__str__()`?) output was different in py2 compared to py3. Part of the problem was that I didn't propagate the status code that was passed in to the superclass so it could get printed. This patch fixes that. I don't know how it worked on py3 before this patch... I also added the usual `__bytes__ = _tobytes` override for good measure. It doesn't seem to be needed for tests to pass, though. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9377 AFFECTED FILES mercurial/error.py tests/test-worker.t CHANGE DETAILS diff --git a/tests/test-worker.t b/tests/test-worker.t --- a/tests/test-worker.t +++ b/tests/test-worker.t @@ -90,7 +90,8 @@ mercurial.error.Abort: known exception (py3 !) Abort: known exception (no-py3 !) raise error.WorkerError(status) - mercurial.error.WorkerError: 255 + WorkerError: 255 (no-py3 !) + mercurial.error.WorkerError: 255 (py3 !) Traceback must be printed for unknown exceptions diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -137,6 +137,10 @@ def __init__(self, status_code): self.status_code = status_code +# Pass status code to superclass just so it becomes part of __bytes__ +super(WorkerError, self).__init__(status_code) + +__bytes__ = _tobytes class InterventionRequired(Hint, Exception): To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Heptapod 0.17 released
On 11/23/20 8:16 PM, Augie Fackler wrote: > > >> On Nov 23, 2020, at 09:31, Georges Racinet >> mailto:georges.raci...@octobus.net>> wrote: >> >> - Mercurial native mode (very experimental, don't activate at all on >> production servers). >> >> It's what we've always wanted to do. We hope it can be made the >> default mode by the end of the year. > > That sounds like a huge milestone. Congrats! Thank you, much appreciated! Now I must insist that the native mode is not even ready enough to put a test project on a production instance. It's disabled by default, of course. But we've started to dogfood it. Here's a native project: https://foss.heptapod.net/mercurial/testhelpers Also, in this first incarnation, the inner conversion to Git still happens, but it's completely contained to the lower layers. I could elaborate later on that elsewhere. Cheers, -- Georges Racinet https://octobus.net, https://about.heptapod.host, https://heptapod.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Heptapod 0.17 released
> On Nov 23, 2020, at 09:31, Georges Racinet > wrote: > > - Mercurial native mode (very experimental, don't activate at all on > production servers). > > It's what we've always wanted to do. We hope it can be made the > default mode by the end of the year. That sounds like a huge milestone. Congrats!___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial-devel | Pipeline #13200 has failed for branch/default | 49625a41
Your pipeline has failed. Project: mercurial-devel ( https://foss.heptapod.net/octobus/mercurial-devel ) Branch: branch/default ( https://foss.heptapod.net/octobus/mercurial-devel/-/commits/branch/default ) Commit: 49625a41 ( https://foss.heptapod.net/octobus/mercurial-devel/-/commit/49625a415dd5d226a330aec0633a227a70be0f7b ) Commit Message: extensions: gracefully warn when doing min vers... Commit Author: Matt Harbison Pipeline #13200 ( https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/13200 ) triggered by Pierre-Yves David ( https://foss.heptapod.net/marmoute ) had 10 failed builds. Job #123744 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123744/raw ) Stage: test Name: test-py2 Job #123748 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123748/raw ) Stage: test Name: test-py2-rust Job #123750 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123750/raw ) Stage: test Name: test-py3-rust-dirstate-tree Job #123751 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123751/raw ) Stage: test Name: test-py2-chg Job #123746 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123746/raw ) Stage: test Name: test-py2-pure Job #123749 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123749/raw ) Stage: test Name: test-py3-rust Job #123747 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123747/raw ) Stage: test Name: test-py3-pure Job #123745 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123745/raw ) Stage: test Name: test-py3 Job #123739 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123739/raw ) Stage: test Name: checks-py2 Job #123740 ( https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/123740/raw ) Stage: test Name: checks-py3 -- You're receiving this email because of your account on foss.heptapod.net. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Heptapod 0.17 released
On Mon, Nov 23, 2020 at 03:31:30PM +0100, Georges Racinet wrote: > Dear Mercurial users and developers, > > we're happy to announce the release of Heptapod 0.17.0 last Friday [1]. > The flagship instances, https://foss.heptapod.net and > https://heptapod.host were upgraded on the same day. > > > Overall an important release for us, we hope you'll enjoy it. Thank you all who worked on Heptapod for this great achievement. It's a pleasure to work with this awesome tool! sandro *:-) ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Mercurial options
Hi, I have over the last couple years done a bit of bash scripting about mercurial. So far I have only come across two annoyances. Neither are show stoppers. The first is just a minor issue. hg-evolve always reports new obsolete changesets. This is true even when the -q / --quiet option is given. The other is regarding how hg is called. For example, I create a bash script name test that does some stuff including calling hg one or more times. I then create the following alias: [alias] test= ! ~/bin/test All works as expected. Mercurial makes the following available to test: HG an exported variable with the path to hg HG_ARGS set to test I always use $HG in my scripts. HG_ARGS not so much. The problem is when I call hg with extra options. hg --hidden test or hg --color never test Test runs without knowing that these options were used. It would be nice to use these options in the script to give the expected behavior. Is there alway to identify used hg options? If not, would it be possible to add an additional exported variable that lists the options in a comma separated format: HG_OPTIONS="--hidden,--color,never" This could then be parsed by a script to obtain the calling options. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9375: ui: ensure `getpass()` returns bytes
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Previously, this could return either bytes or str. I'm not sure which direction we should go in, but since the input is bytes, I guess bytes makes sense as output. `debuguigetpass` crashed because it assumed bytes would be returned, `sslcontext.load_cert_chain()` is happy with bytes or str if the type info in PyCharm is correct, and `smtplib.SMTP.login()` wants str. I couldn't figure out how to test this, because the test stalls for input with `echo test | hg debuguigetpass --config ui.interactive=1`, likely because it drains stdin before prompting. The custom input reading with `ui.nontty=1` does not. I'm also a bit concerned with all of this encoding/decoding. The existing code in the mail module uses `encoding.strfromlocal()`, but the username and password are ascii encoded/decoded in `mercurial.url.passwordmgr.find_user_password()` with `pycompat.{str,bytes}url()`. I'm not sure if this inconsistency could cause subtle compatability issues. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9375 AFFECTED FILES mercurial/debugcommands.py mercurial/mail.py mercurial/ui.py CHANGE DETAILS diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1735,7 +1735,7 @@ raise EOFError return l.rstrip(b'\n') else: -return getpass.getpass('') +return encoding.strtolocal(getpass.getpass('')) except EOFError: raise error.ResponseExpected() diff --git a/mercurial/mail.py b/mercurial/mail.py --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -157,6 +157,8 @@ password = encoding.strfromlocal(password) else: password = ui.getpass() +if password is not None: +password = encoding.strfromlocal(password) if username and password: ui.note(_(b'(authenticating to mail server as %s)\n') % username) username = encoding.strfromlocal(username) diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3787,6 +3787,10 @@ def debuguigetpass(ui, prompt=b''): """show prompt to type password""" r = ui.getpass(prompt) +if r is not None: +r = encoding.strtolocal(r) +else: +r = b"" ui.writenoi18n(b'response: %s\n' % r) To: mharbison72, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9374: bisect: add a `--rev` flag
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is the same as the positional argument, and can be passed more than once. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9374 AFFECTED FILES mercurial/commands.py tests/test-bisect.t tests/test-completion.t CHANGE DETAILS diff --git a/tests/test-completion.t b/tests/test-completion.t --- a/tests/test-completion.t +++ b/tests/test-completion.t @@ -251,7 +251,7 @@ annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template archive: no-decode, prefix, rev, type, subrepos, include, exclude backout: merge, commit, no-commit, parent, rev, edit, tool, include, exclude, message, logfile, date, user - bisect: reset, good, bad, skip, extend, command, noupdate + bisect: reset, good, bad, skip, rev, extend, command, noupdate bookmarks: force, rev, delete, rename, inactive, list, template branch: force, clean, rev branches: active, closed, rev, template diff --git a/tests/test-bisect.t b/tests/test-bisect.t --- a/tests/test-bisect.t +++ b/tests/test-bisect.t @@ -232,8 +232,8 @@ $ hg bisect -r $ hg bisect -b "0::3" - $ hg bisect -s "13::16" - $ hg bisect -g "26::tip" + $ hg bisect -s --rev "13::16" + $ hg bisect -g --rev "26::28" --rev "29" "30::tip" Testing changeset 12:1941b52820a5 (23 changesets remaining, ~4 tests) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat .hg/bisect.state diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -891,6 +891,7 @@ (b'g', b'good', False, _(b'mark changeset good')), (b'b', b'bad', False, _(b'mark changeset bad')), (b's', b'skip', False, _(b'skip testing changeset')), +(b'', b'rev', [], _(b'select the changesets to mark')), (b'e', b'extend', False, _(b'extend the bisect range')), ( b'c', @@ -909,6 +910,7 @@ repo, positional_1=None, positional_2=None, +rev=None, command=None, reset=None, good=None, @@ -998,7 +1000,6 @@ Returns 0 on success. """ -rev = [] # backward compatibility if positional_1 in (b"good", b"bad", b"reset", b"init"): ui.warn(_(b"(use of 'hg bisect ' is deprecated)\n")) To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9372: bisect: refactor to work on a list of revspecs
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will allow adding a `--rev` flag that can be passed more than once. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9372 AFFECTED FILES mercurial/commands.py CHANGE DETAILS diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -907,8 +907,8 @@ def bisect( ui, repo, -rev=None, -extra=None, +positional_1=None, +positional_2=None, command=None, reset=None, good=None, @@ -998,18 +998,22 @@ Returns 0 on success. """ +rev = [] # backward compatibility -if rev in (b"good", b"bad", b"reset", b"init"): +if positional_1 in (b"good", b"bad", b"reset", b"init"): ui.warn(_(b"(use of 'hg bisect ' is deprecated)\n")) -cmd, rev, extra = rev, extra, None +cmd = positional_1 +rev.append(positional_2) if cmd == b"good": good = True elif cmd == b"bad": bad = True else: reset = True -elif extra: +elif positional_2: raise error.InputError(_(b'incompatible arguments')) +elif positional_1 is not None: +rev.append(positional_1) incompatibles = { b'--bad': bad, @@ -1033,12 +1037,13 @@ state = hbisect.load_state(repo) +if rev: +nodes = [repo[i].node() for i in scmutil.revrange(repo, rev)] +else: +nodes = [repo.lookup(b'.')] + # update state if good or bad or skip: -if rev: -nodes = [repo[i].node() for i in scmutil.revrange(repo, [rev])] -else: -nodes = [repo.lookup(b'.')] if good: state[b'good'] += nodes elif bad: @@ -1076,7 +1081,9 @@ if p2 != nullid: raise error.StateError(_(b'current bisect revision is a merge')) if rev: -node = repo[scmutil.revsingle(repo, rev, node)].node() +if not nodes: +raise error.Abort(_(b'empty revision set')) +node = repo[nodes.last()].node() with hbisect.restore_state(repo, state, node): while changesets: # update state To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9371: bisect: use tuple literal instead of split on string literal
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9371 AFFECTED FILES mercurial/commands.py CHANGE DETAILS diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -999,7 +999,7 @@ Returns 0 on success. """ # backward compatibility -if rev in b"good bad reset init".split(): +if rev in (b"good", b"bad", b"reset", b"init"): ui.warn(_(b"(use of 'hg bisect ' is deprecated)\n")) cmd, rev, extra = rev, extra, None if cmd == b"good": To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9373: bisect: add `-G` to an `hg log` command in a test
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This helps readers see what shape of DAG to expect REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9373 AFFECTED FILES tests/test-bisect.t CHANGE DETAILS diff --git a/tests/test-bisect.t b/tests/test-bisect.t --- a/tests/test-bisect.t +++ b/tests/test-bisect.t @@ -14,167 +14,167 @@ adding a - $ hg log - changeset: 31:58c80a7c8a40 - tag: tip - user:test - date:Thu Jan 01 00:00:31 1970 + - summary: msg 31 - - changeset: 30:ed2d2f24b11c - user:test - date:Thu Jan 01 00:00:30 1970 + - summary: msg 30 - - changeset: 29:b5bd63375ab9 - user:test - date:Thu Jan 01 00:00:29 1970 + - summary: msg 29 - - changeset: 28:8e0c2264c8af - user:test - date:Thu Jan 01 00:00:28 1970 + - summary: msg 28 - - changeset: 27:288867a866e9 - user:test - date:Thu Jan 01 00:00:27 1970 + - summary: msg 27 - - changeset: 26:3efc6fd51aeb - user:test - date:Thu Jan 01 00:00:26 1970 + - summary: msg 26 - - changeset: 25:02a84173a97a - user:test - date:Thu Jan 01 00:00:25 1970 + - summary: msg 25 - - changeset: 24:10e0acd3809e - user:test - date:Thu Jan 01 00:00:24 1970 + - summary: msg 24 - - changeset: 23:5ec79163bff4 - user:test - date:Thu Jan 01 00:00:23 1970 + - summary: msg 23 - - changeset: 22:06c7993750ce - user:test - date:Thu Jan 01 00:00:22 1970 + - summary: msg 22 - - changeset: 21:e5db6aa3fe2a - user:test - date:Thu Jan 01 00:00:21 1970 + - summary: msg 21 - - changeset: 20:7128fb4fdbc9 - user:test - date:Thu Jan 01 00:00:20 1970 + - summary: msg 20 - - changeset: 19:52798545b482 - user:test - date:Thu Jan 01 00:00:19 1970 + - summary: msg 19 - - changeset: 18:86977a90077e - user:test - date:Thu Jan 01 00:00:18 1970 + - summary: msg 18 - - changeset: 17:03515f4a9080 - user:test - date:Thu Jan 01 00:00:17 1970 + - summary: msg 17 - - changeset: 16:a2e6ea4973e9 - user:test - date:Thu Jan 01 00:00:16 1970 + - summary: msg 16 - - changeset: 15:e7fa0811edb0 - user:test - date:Thu Jan 01 00:00:15 1970 + - summary: msg 15 - - changeset: 14:ce8f0998e922 - user:test - date:Thu Jan 01 00:00:14 1970 + - summary: msg 14 - - changeset: 13:9d7d07bc967c - user:test - date:Thu Jan 01 00:00:13 1970 + - summary: msg 13 - - changeset: 12:1941b52820a5 - user:test - date:Thu Jan 01 00:00:12 1970 + - summary: msg 12 - - changeset: 11:7b4cd9578619 - user:test - date:Thu Jan 01 00:00:11 1970 + - summary: msg 11 - - changeset: 10:7c5eff49a6b6 - user:test - date:Thu Jan 01 00:00:10 1970 + - summary: msg 10 - - changeset: 9:eb44510ef29a - user:test - date:Thu Jan 01 00:00:09 1970 + - summary: msg 9 - - changeset: 8:453eb4dba229 - user:test - date:Thu Jan 01 00:00:08 1970 + - summary: msg 8 - - changeset: 7:03750880c6b5 - user:test - date:Thu Jan 01 00:00:07 1970 + - summary: msg 7 - - changeset: 6:a3d5c6fdf0d3 - user:test - date:Thu Jan 01 00:00:06 1970 + - summary: msg 6 - - changeset: 5:7874a09ea728 - user:test - date:Thu Jan 01 00:00:05 1970 + - summary: msg 5 - - changeset: 4:9b2ba8336a65 - user:test - date:Thu Jan 01 00:00:04 1970 + - summary: msg 4 - - changeset: 3:b53bea5e2fcb - user:test - date:Thu Jan 01 00:00:03 1970 + - summary: msg 3 - - changeset: 2:db07c04beaca - user:test - date:Thu Jan 01 00:00:02 1970 + - summary: msg 2 - - changeset: 1:5cd978ea5149 - user:test - date:Thu Jan 01 00:00:01 1970 + - summary: msg 1 - - changeset: 0:b99c7b9c8e11 - user:test - date:Thu Jan 01 00:00:00 1970 + - summary: msg 0 + $ hg log -G + @ changeset: 31:58c80a7c8a40 + | tag: tip + | user:test + | date:Thu Jan 01 00:00:31 1970 + + | summary: msg 31 + | + o changeset: 30:ed2d2f24b11c + | user:test + | date:Thu Jan 01 00:00:30 1970 + + | summary: msg 30 + | + o changeset: 29:b5bd63375ab9 + | user:test + | date:Thu Jan 01 00:00:29 1970 + + |
D9370: hgignore: add VS Code config
SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9370 AFFECTED FILES .hgignore CHANGE DETAILS diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -49,6 +49,7 @@ .DS_Store tags cscope.* +.vscode/* .idea/* .asv/* .pytype/* To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Heptapod 0.17 released
Dear Mercurial users and developers, we're happy to announce the release of Heptapod 0.17.0 last Friday [1]. The flagship instances, https://foss.heptapod.net and https://heptapod.host were upgraded on the same day. This version drops support for Python 2 on the server side, is based on GitLab 13.4, Mercurial 5.5.2 and hg-evolve 10.1.0, and has several "technology previews", notably: - Git repositories (don't host production projects yet). Of course, the point of Heptapod is to host Mercurial repos, but that should make life simpler for the many among our users that *also* have Git repositories. - Mercurial native mode (very experimental, don't activate at all on production servers). It's what we've always wanted to do. We hope it can be made the default mode by the end of the year. Many more details, including some sreenshots are provided by the 0.17.0rc1 announcement [2]. Overall an important release for us, we hope you'll enjoy it. Best, [1] https://heptapod.net/heptapod-0.17.0.html#heptapod-0.17.0 [2] https://heptapod.net/heptapod-0170rc1-released-with-3-tech-previews.html#heptapod-0170rc1-released-with-3-tech-previews -- Georges Racinet https://octobus.net, https://about.heptapod.host, https://heptapod.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9369: share: show warning if share is outdated while source supports share-safe
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Previous patches in the series and some which are already committed implements share safe functionality where config and requirements will be shared too. Rolling this feature has a problem that existing shares may never upgrade as they will never learn about the new config. To help the transition, we show a warning messafe if the share source supports share-safe mechanism. This provides the source repo ability to upgrade and pass on the message to shares that you should reshare and upgrade too. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D9369 AFFECTED FILES mercurial/localrepo.py tests/test-share-safe.t CHANGE DETAILS diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t --- a/tests/test-share-safe.t +++ b/tests/test-share-safe.t @@ -373,6 +373,7 @@ Make sure existing shares still works $ hg log -GT "{node}: {desc}\n" -R ../nss-share + warning: source repository supports share-safe functionality. Reshare to upgrade. @ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar | o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -558,6 +558,11 @@ # NOTE: presence of SHARESAFE_REQUIREMENT imply that store requirement # is present. We never write SHARESAFE_REQUIREMENT for a repo if store # is not present, refer checkrequirementscompat() for that +# +# However, if SHARESAFE_REQUIREMENT is not present, it means that the +# repository was shared the old way. We check the share source .hg/requires +# for SHARESAFE_REQUIREMENT to detect whether the current repository needs +# to be reshared if requirementsmod.SHARESAFE_REQUIREMENT in requirements: if shared: # This is a shared repo @@ -566,6 +571,15 @@ storevfs = vfsmod.vfs(hgvfs.join(b'store')) requirements |= _readrequires(storevfs, False) +elif shared: +sourcerequires = _readrequires(sharedvfs, False) +if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: +ui.warn( +_( +'warning: source repository supports share-safe functionality.' +' Reshare to upgrade.\n' +) +) # The .hg/hgrc file may load extensions or contain config options # that influence repository construction. Attempt to load it and To: pulkit, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel