Mercurial wipes repository history!?

Thomas Maier-Komor thomas at maier-komor.de
Thu Apr 8 16:01:42 UTC 2010


On 08.04.2010 17:40, Masklinn wrote:
> On 8 avr. 2010, at 17:25, Jon Ribbens <jon-mercurial at unequivocal.co.uk>
> wrote:
>>
>> Can you think of a use case that illustrates why anyone would ever
>> want to roll back a "clone" - why it would ever *not* be the wrong
>> thing to do?
> Just because it isn't generally useful doesn't mean it's a bug.
> 
> rm -rf / generally isn't a good idea, but it's not rm's job to decide
> what is or isn't a good idea to call it on. Likewise, rollback has a
> simple contract: roll back the last transaction.
> 

The standard was changed some time ago to disallow "rm -rf /". There was
a lot of discussion in the direction you are proposing (i.e. it should
just do what it is told to do), and also people found no use case that
would make sense for this command to execute.

IIRC, the ultimate argument for disallowing this command was that this
would require the link to / being removed in /.., which is impossible as
/. and /.. are the same.

- Thomas



More information about the Mercurial mailing list