Question

This seems to happen all the time to me: I work on the parent repo. I find and fix a bug in a subrepo. I carry on with parent repo work. I commit the parent repo with a message like "Added feature X". I push.

At this point I notice that the subrepo bugfix got committed and pushed too, with a commit message that has absolutely nothing to do with the subrepo.

What’s the easiest way to make myself a "commit" replacement which would refuse to do anything in this situation, pointing out that a subrepo has uncommitted changes? Alternatively, perhaps there’s a setting I can put in my .hgrc?

Was it helpful?

Solution

You have two options:

  1. Upgrade your Mercurial instalation to 2.0 or later
  2. Edit your ~/.hgrc file and add the following option to the [ui] section:

    commitsubrepos = false
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top