Reputation: 6685
In Mercurial, what is the difference between
hg revert --all
and
hg up -C?
It seems that both commands revert all changes. But what is the difference?
Upvotes: 3
Views: 227
Reputation: 2542
with hg up
you actually switch to another revision (possibly abandoning your current branch)
with hg revert --all
you change all files to be the same as in another revision, but remaining on you current working directory (and branch), meaning you can proceed with commit, or modify a couple of stuff before making such commit
it is more common to hg revert
one single file, and that is why when you revert them all Mercurial asks you whether you are sure about that, or else want to perform an update instead
Upvotes: 4