Mercurial wipes repository history!?

Steve Losh steve at stevelosh.com
Thu Apr 8 10:05:25 CDT 2010


On Apr 8, 2010, at 10:57 AM, Jon Ribbens wrote:

> On Thu, Apr 08, 2010 at 04:48:03PM +0200, Dirkjan Ochtman wrote:
>>> Losing repositories is a far *worse* bug, if that's indeed what
>>> happened.
>> 
>> No, it's not, because we don't "lose" repositories unless they're
>> fresh clones.
>> 
>> I suggest you read some docs on rollback or try different scenarios in
>> a test repository to get a feel for what it actually does, because it
>> doesn't look like you're getting it yet (even though Benoit and I have
>> explained it several times in this thread).
> 
> No, you're not getting it, despite me explaining it several times.
> The scenario we were investigating was that the rollback *did*
> lose a respository that was not a fresh clone.

From your original email:

... version info ...
$ hg -q clone ssh://hg@hg/audit
$ cd audit
$ hg log | wc -l
4828
$ hg rollback
rolling back last transaction
$ hg log
$ find .hg/store/data -type f

Summary:

* Make a fresh clone and cd into it.
* Look at the log and see 4828 changesets.
* Run rollback.
* Notice the history is gone.

Running 'hg log' does not change the repository so it *is* a fresh clone.

The last "transaction" performed was pulling all 4828 changesets from the remote server, so when you ran rollback they were removed.

> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list