DVCS PEP (rollback / uncommit)
Antoine Pitrou
solipsis at pitrou.net
Fri Jan 23 11:15:05 UTC 2009
Alexander Solovyov <piranha <at> piranha.org.ua> writes:
> I'm reading PEP right now and see that some sections are not equal for
> bzr and hg (and git sometimes, but I'm not that knowledgeable with git,
> so I'd prefer to not correct its sections).
>
> For example, in "Backing Out Changes":
>
> > Note that if the change you want revert is the last one that was made,
> > you can just use bzr uncommit.
>
> But "hg rollback" is not mentioned for hg, though it's used for the same
> purpose.
It only works if the change to backout hasn't already pushed elsewhere.
Actually, looking at the doc for "bzr uncommit", it seems to be the equivalent
of "hg strip", so it is a misleading statement in the PEP: you can't
uncommit/strip if your history has already been pushed elsewhere (because it
won't uncommit/strip in other people's repositories, just in your local
instance).
"hg backout", on the other hand, commits a new changeset which is the reverse
of the changeset to backout, which means it is safe to use if the changeset to
backout has been pushed.
Regards
Antoine.
More information about the Mercurial
mailing list