hg rollback and hg strip --keep -r . Are not identical
Uwe Brauer
oub at mat.ucm.es
Mon Jul 22 14:00:37 UTC 2019
Hi
Have set
tweakdefaults = true
I realised that hg rollback is not recommended.
The command which is closest to rollback I can come up with is
hg strip --keep -r .
(Maybe hg uncommit could also do it, but I was not able to get the
results I wanted)
Anyhow here is the difference.
The state I begin with is:
hg status
M file1.el
? ChangeLog
So I run
hg addremove
hg commit -m "test"
Then
hg rollback
brings be back the following state
hg status
M file1.el
A ChangeLog
Which is correct because this is the state I was before I run the commit
command.
However
hg strip --keep -r .
Brings me to
hg status
M file1.el
? ChangeLog
Which the status before I added.
It seems a minor issue, but is there any other substitution for
hg rollback?
Regards
Uwe Brauer
More information about the Mercurial
mailing list