(corrupt repo, repaired) pushing remote has heads on branch 'default' that are not known locally

Uwe Brauer oub at mat.ucm.es
Mon Jul 25 15:58:06 UTC 2016


    > 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.




More information about the Mercurial mailing list