vscode-hg icon indicating copy to clipboard operation
vscode-hg copied to clipboard

Enhancement: Allow user to specify username instead of error "Hg: no username supplied"

Open hdpoliveira opened this issue 5 years ago • 3 comments

When doing the first commit, if the username is not specified, we issue an error:

image

We could prompt the user to enter a username instead.

hdpoliveira avatar Jun 21 '20 14:06 hdpoliveira

Mercurial shows this:

hg commit hello -m Add hello
abort: no username supplied
(use 'hg config --edit' to set your username)

We can at least display a button to hg config --edit

hdpoliveira avatar Jun 21 '20 14:06 hdpoliveira

I dig it. There's a function errorPromptOpenLog in interaction.ts that we'll want to use for this. It corresponds to the error-handling section of createCommand in the Git extension. I am refactoring it a little for #18, so let me finish that before you start this (assuming you want to take it, of course).

incidentist avatar Jun 22 '20 05:06 incidentist

Ok! :smile:

hdpoliveira avatar Jun 22 '20 12:06 hdpoliveira