0

Closed: I started a hg clone... by error in the git repository and this created an empty hg repository. So hggit checks the differences with the empty hg repo and not the git conversion.

$ hg incoming -r branchname_bkm G1
comparing with /home/xxxx/src
abort: unknown revision 'branchname_bkm'

_bkm is the suffix I use between git branches and hg bookmarks.

I have a mercurial repository for long time (named HG0). I converted it to git using the hggit extension, pushed it to gitlab.

I usually develop in the git repo (named G1) but our official repo is still mercurial. When needed, I import a git branch (as bookmarks) this way:

  • update the hg-git map:

    cd HG0
    hg pull
    hg update main_bkm  # bookmark on default == main
    hg git-cleanup
    hg outgoing G1
    
  • import git branch:

    hg in -r <branchname> G1
    

It worked perfectly during months.

For about 2 weeks, hg out shows me all the changesets, not only the new ones and hg in returns unknown revision!

I created a new git clone G2 from gitlab. hg out G2 is correct and only shows few revs as expected. I could exchange my git branch from G1 to G2 and get it in HG0, ok.

How can I "re-synchronize" my hg repo with G1?

  • git-cleanup does not change anything.

  • I even tried to entirely rebuild the embedded .hg/git (~2 hours), no change.

  • If I grep a revision shown by hg out G1 in .hg/git-mapfile, it corresponds to the related revision in G1...

  • May git garbage collection process "hides" something used to identify the repo?

Thanks in advance.

mcourtois
  • 11
  • 2

0 Answers0