3

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?

C2H5OH
  • 5,452
  • 2
  • 27
  • 39
Roman Starkov
  • 59,298
  • 38
  • 251
  • 324

1 Answers1

7

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
    
C2H5OH
  • 5,452
  • 2
  • 27
  • 39