Improving interaction with subrepos in fork
Created originally on Bitbucket by BufferOverflowx86 (BufferOverflow)
Fork with subrepos is hell ( https://bitbucket.org/rstarkov/tankiconmaker As you see, it has two subrepos. And I need to edit main repo and one of subrepo at once. And I've found that it's impossible. When I fork it, I got a forked repo with two original subrepos. Logically I need to fork subrepo if I want to modify it as well. I've did it. But how to integrate forked subrepo into forked repo? Logically I need to modify .hgsub. But I can't do it. If I'll do, I'll be unable to create pull request, сos my future pull request shouldn't change subrepos in original repo. I've tried to modify hgrc in subrepo to add my forked subrepo as second source. Pull from original, push to fork. But I've run into another problem. I've successfully commit&push change to my subrepo, and then I've found that I no longer able to push to my main repo. Cos when I push, tortoise firstly tries to push changes to subrepo. Not my forked subrepo, but original one. Since I have no access, I'm unable to do it. And I've found no way to prevent tortoise from pushing to original repo. Even when I temporarily edited .hgsub to replace original repo with forked one, tortoise still was trying to push changes to original subrepo. Only solution was cloning new copy and adding my changes without even touching subrepo. Now I have 2 copies of my repo fork and one 1 of subrepo. I'm working on one copy, then I split changes and apply it to second repo clone and subrepo clone to push it and create a pull request. At least I can do something with subrepo for now. But now another problem - when originator merges my pull request, automated build brokens. After all, I've changed subrepo, but in main repo pull request there is no differences in .hgsubstate, and automated tool still uses old revision of subrepo with new revision of repo. And I've found that there is no way to push updated .hgsubstate because tortoise refuses. It allows to push it only with pushing subrepo, which, as I've told already, is impossible cos it tries to push changes to original subrepo. I would like if there is already a solution for this, but as far as I know there isn't.