(corrupt repo, repaired) pushing remote has heads on branch 'default' that are not known locally
Sean Farley
sean at farley.io
Mon Jul 25 18:35:26 UTC 2016
Uwe Brauer <oub at mat.ucm.es> writes:
> > On Mon, Jul 25, 2016 at 2:11 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
> > 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.
>
>
> > 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.
>
>
> I wish I knew.
>
> I think it might have to do with the fact, that I use rsync to copy my
> whole directory (with all the mercurial repos as subdirectories) to a
> USB stick and then at home do the inverse. Maybe some data corruption
> occured that way it would be better not to rely on rsync, but on hg push
> and pull for my repos. It is just too uncomfortable to do it.
Almost certainly this is what caused it. Also, before blowing away and
doing a 'push -f' on bitbucket, you should contact support at bitbucket.org
for help. I could even potentially inspect the repo to see what's wrong
with it.
More information about the Mercurial
mailing list