repositories can diverge
Created originally on Bitbucket by kmike (Mikhail Korobov)
Hi,
I am using hg-git to maintain hg clones of some of git repos (e.g. https://github.com/kmike/psd-tools and https://bitbucket.org/kmike/psd-tools). I'm using two computers, different versions of hg-git and mercurial, updating them from time to time. Generally it works fine, but sometimes the repos start to diverge. I haven't understood when exactly does it happen.
The common pattern:
- merge a pull request using github "merge" button;
- pull changes from git repo to hg repo on computer 1;
- push changes from computer 1 to bitbucket (to keep BB repo up-to-date);
- pull these changes from bitbucket OR from github on computer 2;
- fix something on computer 2, push changes to bitbucket & github.
After several such iterations "hg out" or "hg in" start to show commits that shouldn't be pulled/pushed and I have to do some dances with hg strip (exact steps are hard to remember, I'm figuring them out each time) to make hg work again on one of the computers.
Is this pattern problematic? How can one prevent these errors? Am I using hg-git properly?
With recent hg-git and a clean copy psd-tools bitbucket and github repos diverge:
hg clone ssh://hg@bitbucket.org/kmike/psd-tools
; add git = git+ssh://git@github.com:kmike/psd-tools.git to hgrc [paths]
hg in git
; .. shows commits starting from r219, while it should show none
On computer 2 hg thinks repos are OK.