diff -r e71053ef0c46 -r 76b0b0fed2e3 mercurial/localrepo.py --- a/mercurial/localrepo.py Wed Mar 25 16:40:37 2015 -0700 +++ b/mercurial/localrepo.py Wed Mar 25 13:55:32 2015 +0900 @@ -1372,10 +1372,10 @@ if not force: raise util.Abort( _("commit with new subrepo %s excluded") % s) - if wctx.sub(s).dirty(True): + dirtyreason = wctx.sub(s).dirtyreason(True) + if dirtyreason: if not self.ui.configbool('ui', 'commitsubrepos'): - raise util.Abort( - _("uncommitted changes in subrepo %s") % s, + raise util.Abort(dirtyreason, hint=_("use --subrepos for recursive commit")) subs.append(s) commitsubs.add(s)