hg rollback and hg strip --keep -r . Are not identical
Pulkit Goyal
7895pulkit at gmail.com
Mon Jul 22 14:11:09 UTC 2019
On Mon, Jul 22, 2019 at 5:03 PM Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
>
> 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?
rollback in general has more functionality then undoing a commit. But
for just undoing a commit, `hg uncommit` is the best suited command. I
see you mentioned that you were not able to get desired results using
that, can you share details on that?
>
> Regards
>
> Uwe Brauer
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list