hg push fails with git subrepo no branch checked out in subrepo
Created originally on Bitbucket by timeless (timeless developer)
hg pushing to git+ssh://git@github.com:.../PowerShell.git no branch checked out in subrepo src/libpsl-native/test/googletest cannot push revision c99458533a9b4c743ed51537e25989ea55944908
https://github.com/PowerShell/PowerShell/tree/master/src/libpsl-native/test googletest @ c994585
quoting StackOverflow
First, it seems that mercurial cannot handle git subrepos with a detached HEAD.
When you execute git checkout 3.4.1, your repo enters a detached HEAD state (you should have seen a warning to that effect when you executed the command). At that point, if you run git branch, you see that (no branch) is listed as the active branch. When mercurial attempts to push, it chokes on this state. You could ask the mercurial developer list why this happens, but it probably a limitation of the existing subrepo implementation.