mercurial/commands.py
branchstable
changeset 15321 e174353e8cda
parent 15307 718e0684c703
child 15327 67e92d29ecb5
--- a/mercurial/commands.py	Thu Oct 20 17:05:13 2011 -0400
+++ b/mercurial/commands.py	Fri Oct 21 00:33:08 2011 +0200
@@ -1143,7 +1143,7 @@
      _('mark new/missing files as added/removed before committing')),
     ('', 'close-branch', None,
      _('mark a branch as closed, hiding it from the branch list')),
-    ] + walkopts + commitopts + commitopts2,
+    ] + walkopts + commitopts + commitopts2 + subrepoopts,
     _('[OPTION]... [FILE]...'))
 def commit(ui, repo, *pats, **opts):
     """commit the specified files or all outstanding changes
@@ -1167,6 +1167,10 @@
 
     Returns 0 on success, 1 if nothing changed.
     """
+    if opts.get('subrepos'):
+        # Let --subrepos on the command line overide config setting.
+        ui.setconfig('ui', 'commitsubrepos', True)
+
     extra = {}
     if opts.get('close_branch'):
         if repo['.'].node() not in repo.branchheads():