(corrupt repo, repaired) pushing remote has heads on branch 'default' that are not known locally
Simon King
simon at simonking.org.uk
Mon Jul 25 13:25:53 UTC 2016
On Mon, Jul 25, 2016 at 2:11 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
> > On Mon, Jul 25, 2016 at 9:13 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
> > How you resolve this depends on what you use the bitbucket
> > repository for. If it is just for personal use, perhaps as a
> > backup, then I would probably rename the bitbucket repository and
> > create a new empty one in its place. Then you can push the results
> > of the conversion to the new empty repository. (The renamed one
> > can be deleted once you are *completely certain* that you don't
> > need anything from it).
>
> Ok, this is the case (private repo/backup) and your proposal is the
> solution I was thinking about.
>
> However I have also repos which I share for collaboration (fortunately I
> had no data corruption so far). What should I do in such a case? Better
> not use the convert extension?
It's difficult to recommend a single strategy since it depends on the
kind of corruption that has occurred. To be honest, the best strategy
is to ensure you maintain good backups. Pushing regularly to something
like bitbucket (even if it's a private fork of the main repository)
seems like a good idea.
>
> What is about repos I use with the git-hg plugin, any rule how to deal
> with data corruption in those cases?
>
In repositories using the git-hg plugin, every commit that you make is
duplicated to the git repository in .hg/git, so in theory it should be
possible to rebuild one given the other. I don't know exactly what the
steps would be though.
Out of interest, do you know how your repository got corrupted in the
first place? Mercurial is very careful in the way it stores data, and
any bug that caused repo corruption would be treated very seriously.
Cheers,
Simon
More information about the Mercurial
mailing list