This is an archive of the discontinued Mercurial Phabricator instance.

unfinishedstate: suggested `hg update .` (including `.`) to complete update
ClosedPublic

Authored by martinvonz on Oct 3 2019, 4:18 PM.

Details

Summary

hg update can update to a different and undesired commit. For users
who have commands.update.requiredest=yes, it's even an error to run
just `hg update.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Oct 3 2019, 4:18 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
spectral added inline comments.
mercurial/state.py
204

I wonder if it would be possible to portably quote the . so that users don't think it's just sitting on the end there. Something like hg update '.' If not, then we should surround the entire thing in quotes if possible, something like To continue: 'hg update .'

Thoughts?

martinvonz added inline comments.Oct 15 2019, 9:47 AM
mercurial/state.py
204

We often quote the whole command like you did in your second example. However, I don't really want to do that with all the commands here (e.g. the bisect commands a few lines down). We could quote just the '.', but I think it's already quite clear from the context that the . is part of the command -- the spaces before it makes it look like it's not part of a sentence.