resolved data corruption with convert, now I can't push

Matt Harbison mharbison72 at gmail.com
Thu Jun 1 02:22:14 UTC 2017


On Wed, 31 May 2017 07:00:47 -0400, Uwe Brauer <oub at mat.ucm.es> wrote:

>
>
>
> Hi
>
> I screwed up, by copying my repo via rscyn to a USB stick, now

Isn't the clone that was the source of rsync still around?

> Hg verify tells me
>
> checking files
>  Lista/Lista-Ej/lista.org@?: rev 5 points to unexpected changeset 521
>  (expected 485 487 488 490 503 510 525 532)
>  README.org@?: rev 15 points to unexpected changeset 522
>  (expected 243 285 383 435 478 479 480 485 487 488 490 503 508 509 510  
> 514 518 525)
> 1242 files, 551 changesets, 1903 total revisions
> 2 warnings encountered!
> 2 integrity errors encountered!
>
> So I used
>
> hg convert --config convert.hg.ignoreerrors=True repo1/ repofix/
>
> Which worked, but then I wanted to push from repofix to bitbucket (I
> have not done that for 2 weeks) but I obtain
>
> remote has heads on branch 'default' that are not known locally:  
> 6004f738e2d5
> remote has heads on branch 'exam-geo2-2016-parts' that are not known  
> locally: adfdfc6ba6c5
> remote has heads on branch 'year-2016-17' that are not known locally:  
> 7cdd8585c0ac
> abort: push creates new remote head c698c52f6a03!
> (pull and merge or see 'hg help push' for details about pushing new  
> heads)

I think converting and ignoring errors is the Rambo solution.  You could  
use 'incoming' from BB into the converted repo to count how many BB  
commits got mangled.  If there aren't many, maybe you don't care (though  
it would be recent).  If there are many, that means the corruption  
occurred early on, not necessarily that there's something wrong with  
subsequent commits.

I'm not sure if it's possible with the corruption, but I'd look at  
exporting the outgoing patches (possibly from the converted repo), and  
import them into a fresh BB clone.  You will probably have to be mindful  
of the commit messages, to eliminate duplicates.

> I could use the *Rambo* solution, delete the bitbucket repo and recreate
> it. Or is there any solution without much headache?
>
> Thanks
>
> Uwe Brauer
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial



More information about the Mercurial mailing list