Mercurial Subrepositories: Prevent accidental recursive commits and pushes
I work on a team where we have a code in a mercurial repository with several subrepositories: main/ main/subrepo1/ main/subrepo1/subrepo2/ The default behavior of Mercurial is that when a hg commit is performed in "main", any outstanding changes in the subrepositories "subrepo1" and "subrepo2" will also be committed. Similarly, when "main" is pushed, any outgoing commits in "subrepo1" and "subrepo2" will also be pushed. We find that people frequently inadvertently commit and push changes in their subrepositories (because they forgot they had made changes, and hg status by default does not show