update, revert and switch

Sébastien Pierre sebastien at xprima.com
Tue May 16 13:24:47 CDT 2006


Hi all,

While introducing Mercurial to a subset of our team, I constantly
noticed that "revert" and "update" were causing some confusion.

The intuitive comprehension of these operations being:

- revert : undo, or "go back to previous state"
- update : "go to the newest state"

I don't remember who exactly proposed this, but there was a suggestion
to rename "update" to "switch". While I don't think getting rid of
"update" is a good idea, I feel that we could try to reformulate the
revert and update commands so that they are not confusing anymore.

For instance, "revert" and "update" could be variants of a more generic
"switch" operation :

- revert would only switch files to a previous revision
- update would only switch files to a newer revision
- switch would switch with any revision

There could be an option that would "reparent" to the given revision as
well (what update currently does).

Does this seems like a good idea ?

 -- Sébastien






More information about the Mercurial mailing list