hg-git doesn't error out when pushing to a git repository while patches from a mq are applied
Created originally on Bitbucket by Louis Opter
Hello,
hg push
to a git repo doesn't fail when the working copy has patches applied, here is a screen shot that shows it:
It would be really cool if that check was implemented in hg-git: pushing from a working copy with patches applied is a very easy error to make and the consequences are really annoying.
I tried to make this quick hook to avoid this from happening again but ran into other hg/git push issues ("abort: git remote error: refs/heads/master failed to update
"):
#!ini
[hooks]
preoutgoing = [ "$(hg qapplied | wc -l)" -eq 0 ]
Otherwise, I wanted to say that hg-git has been a life-saver.
Edit, versions:
(hg-git)wintermute:0:/tmp/kal/tmp/hg-test% pip freeze | grep -E '(mercurial|hg-git|dulwich)'
dulwich==0.11.2
hg-git==0.8.3
mercurial==3.6.1
(hg-git)wintermute:0:/tmp/kal/tmp/hg-test%