Mercurial wipes repository history!?
Jon Ribbens
jon-mercurial at unequivocal.co.uk
Fri Apr 9 09:28:55 UTC 2010
On Thu, Apr 08, 2010 at 11:40:51AM -0500, Mark A. Flacy wrote:
> On Thu, 2010-04-08 at 16:25 +0100, Jon Ribbens 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?
>
> Easy. You used the wrong repository from which to clone.
Sorry, no. In that circumstance "rollback" doesn't do anything useful.
You'll end up with the wrong working directory and a repository still
parented on the wrong upstream.
If you clone the wrong repository then nothing will fix that except
'rm -r repository' followed by a new 'clone' with the right
parameters.
> I'll add that if you really believe that someone would never want to
> rollback a clone, then they will not issue the command in the first
> place.
That is obviously untrue - people can and will do it by mistake.
When the commands are entered all in a row like my shell log at the
start of this thread, then of course it's easy to see what's happening
and nobody's likely to do that in real life. However if you have a
repository that's been sitting there for days or weeks and you are
mistaken as to what the last thing that happened to it is, then the
repository suddenly going boom is fairly spectacularly suprising.
Version control systems are something you *need* confidence in,
and I can tell you as a fact from personal experience that it suddenly
denying all knowledge of everything you've ever done does *not*
inspire confidence.
More information about the Mercurial
mailing list