Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically enable extensions when their commands are run #109

Closed
mrcrowl opened this issue Jul 3, 2020 · 4 comments · Fixed by #134
Closed

Automatically enable extensions when their commands are run #109

mrcrowl opened this issue Jul 3, 2020 · 4 comments · Fixed by #134
Assignees
Labels
Milestone

Comments

@mrcrowl
Copy link
Owner

mrcrowl commented Jul 3, 2020

Related to Issue #18 and PR #96:

PR #96 introduced the various shelve commands: Shelve/Unshelve/etc. However, these commands require that the hg shelve extension is enabled, i.e.

[extensions]
shelve=

... must be present in .hgrc or repo's hgrc file.

Without this, the commands silently fail. The hg log window shows:

hg: unknown command 'shelve'
(did you mean one of resolve, serve?)

The UI should detect this error message and provide a link to instructions on how to enable shelving.

@mrcrowl mrcrowl added the ux label Jul 3, 2020
@mrcrowl mrcrowl mentioned this issue Jul 3, 2020
@incidentist
Copy link
Collaborator

Ah, good catch. There's actually a way to enable extensions via command line at runtime. If that works we wouldn't need a message.

@incidentist incidentist self-assigned this Jul 3, 2020
@hdpoliveira
Copy link
Collaborator

With #104 I introduce some error handling for missing extensions.
Not perfect, but at least it doesn't fail silently

@hdpoliveira hdpoliveira added this to the 1.7.0 milestone Jul 3, 2020
@incidentist
Copy link
Collaborator

@mrcrowl What version of hg did you use to get that error message? I'm on hg 5.4.0 and even when I remove shelve from my extensions list in .hgrc, and verify that shelve doesn't appear when I run hg config, I can still run shelve/unshelve, even in a new repo. If I remove purge from extensions and try a purge, I do see the unknown command message.

@incidentist
Copy link
Collaborator

Ah, shelve is always on by default starting in hg 5.1.

@incidentist incidentist changed the title Shelve commands should notify the user when the shelve extension is not enabled Automatically enable extensions when their commands are run Jul 5, 2020
incidentist added a commit to incidentist/vscode-hg that referenced this issue Jul 5, 2020
hdpoliveira added a commit that referenced this issue Jul 5, 2020
Enable shelve and purge extensions when their commands are run
Fixes #109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants