This is an archive of the discontinued Mercurial Phabricator instance.

update: print warning about hidden changeset after update
ClosedPublic

Authored by martinvonz on May 8 2018, 1:11 AM.

Details

Summary

When an attempt to update to a hidden changeset fails because the
working copy is dirty, you may get a message like this:

updating to a hidden changeset 343f6de32686
(hidden revision '343f6de32686' was rewritten as: 4ab941244072)
abort: conflicting changes
(commit or update --clean to discard changes)

It's easy to miss the real error here. This patch moves the warning
about the hidden changeset to after the update has happened. It
changes the verb tense accordingly (and drops the "a" that I think it
sounds better without). Of course, this means that the commit isn't
actually hidden anymore when the message is printed. I think that's
fine.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.May 8 2018, 1:11 AM

Does it means that someone that try to update to a hidden changeset with a dirty conflicting workdir will first need to solve the conflict before seeing that the changeset is hidden and that it could be potentially the source of the conflict?

martinvonz updated this revision to Diff 8556.May 8 2018, 2:18 PM

Does it means that someone that try to update to a hidden changeset with a dirty conflicting workdir will first need to solve the conflict before seeing that the changeset is hidden and that it could be potentially the source of the conflict?

Added test case for that. It wasn't working before because I was checking "not ret". I think I had been writing too much C code recently.

pulkit accepted this revision.May 9 2018, 6:14 PM
This revision was automatically updated to reflect the committed changes.