You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'Recovering old versions' section suggests using revert to return to a historical revision. It first suggests using revert to handle a mistaken change in the working directory, but then goes on to suggest revert as a general mechanism for returning to an arbitrary earlier revision. I think this is not the intended use of revert, and that recommending update would be better.
Rationale:
The mercurial documentation for revert starts with a Note saying ‘To check out earlier revisions, you should use "hg update REV". To cancel an uncommitted merge (and lose your changes), use "hg update --clean .".’
The same documentation mentions the -r option only in the context of indicating which of two parents should be reverted to (as opposed to arbitrary older revisions).
Thus my impression is that revert is a relatively ‘advanced’ Mercurial command, intended only for fixing mistakes. It's useful to mention it, but perhaps only for the special case of immediate fixing of a mistaken edit. It might usefully come as a final remark to a ‘Recovering old versions’ page which primarily discusses update.
On the couple of occasions when I've taught this Mercurial lesson, I've told the class to use update in this case, and specifically not to use revert.
I could offer a pull request for redrafted the text if that would seem useful.
The text was updated successfully, but these errors were encountered:
The 'Recovering old versions' section suggests using
revert
to return to a historical revision. It first suggests usingrevert
to handle a mistaken change in the working directory, but then goes on to suggestrevert
as a general mechanism for returning to an arbitrary earlier revision. I think this is not the intended use ofrevert
, and that recommendingupdate
would be better.Rationale:
revert
starts with a Note saying ‘To check out earlier revisions, you should use "hg update REV". To cancel an uncommitted merge (and lose your changes), use "hg update --clean .".’-r
option only in the context of indicating which of two parents should be reverted to (as opposed to arbitrary older revisions).revert
solely in the context of fixing mistakes.Thus my impression is that
revert
is a relatively ‘advanced’ Mercurial command, intended only for fixing mistakes. It's useful to mention it, but perhaps only for the special case of immediate fixing of a mistaken edit. It might usefully come as a final remark to a ‘Recovering old versions’ page which primarily discussesupdate
.On the couple of occasions when I've taught this Mercurial lesson, I've told the class to use
update
in this case, and specifically not to userevert
.I could offer a pull request for redrafted the text if that would seem useful.
The text was updated successfully, but these errors were encountered: