Mercurial wipes repository history!?

Benoit Boissinot bboissin at gmail.com
Thu Apr 8 09:45:39 CDT 2010


On Thu, Apr 8, 2010 at 4:39 PM, Jon Ribbens
<jon-mercurial at unequivocal.co.uk> wrote:
> On Thu, Apr 08, 2010 at 03:42:29PM +0200, Benoit Boissinot wrote:
>> hg help rollback: roll back the last transaction
>>
>> In the case of a clone using a network protocol, it will rollback the
>> last transaction. It means removing the entire history of the local
>> repo.
>>
>> (sorry I don't see what's wrong with that).
>
> At the very least, it violates the principle of least surprise to an
> enormous extent. Plus the circumstances in which it just happened to
> us involved the last transaction *not* being a "clone" and it still
> wiping the repository.

A transaction is an operation modifying the history. As far as I can
tell from your command log, the last transaction *is* the clone
operation.

>> > Also the behaviour is different if the parent
>> > repository is local not remote - the rollback just says it has no
>> > rollback info and does nothing.
>>
>> Yep, we could probably make it rollback too so it is more consistent.
>
> Surely it would be much better to make the remote behaviour fail too?
> Suddenly vaporising the entire repository without warning is hardly
> good behaviour to be more widely introduced!

from hg help rollback:

 This command should be used with care. There is only one level of
rollback, and there is no way to undo a rollback.

regards,

Benoit


More information about the Mercurial mailing list