# HG changeset patch # User Matt Mackall # Date 1246428324 18000 # Node ID 4a1187d3cb0047c4422c94a5cdd08ad47d28304b # Parent 46441934c585c95f85c055be6227d01d4364fff7 commit: report modified subrepos in commit editor diff -r 46441934c585 -r 4a1187d3cb00 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jul 01 00:41:14 2009 -0500 +++ b/mercurial/cmdutil.py Wed Jul 01 01:05:24 2009 -0500 @@ -1209,12 +1209,12 @@ return commitfunc(ui, repo, message, match(repo, pats, opts), opts) -def commiteditor(repo, ctx): +def commiteditor(repo, ctx, subs): if ctx.description(): return ctx.description() - return commitforceeditor(repo, ctx) + return commitforceeditor(repo, ctx, subs) -def commitforceeditor(repo, ctx): +def commitforceeditor(repo, ctx, subs): edittext = [] modified, added, removed = ctx.modified(), ctx.added(), ctx.removed() if ctx.description(): @@ -1231,6 +1231,7 @@ if ctx.branch(): edittext.append(_("HG: branch '%s'") % encoding.tolocal(ctx.branch())) + edittext.extend([_("HG: subrepo %s") % s for s in subs]) edittext.extend([_("HG: added %s") % f for f in added]) edittext.extend([_("HG: changed %s") % f for f in modified]) edittext.extend([_("HG: removed %s") % f for f in removed]) diff -r 46441934c585 -r 4a1187d3cb00 mercurial/localrepo.py --- a/mercurial/localrepo.py Wed Jul 01 00:41:14 2009 -0500 +++ b/mercurial/localrepo.py Wed Jul 01 01:05:24 2009 -0500 @@ -872,7 +872,7 @@ cctx = context.workingctx(self, (p1, p2), text, user, date, extra, changes) if editor: - cctx._text = editor(self, cctx) + cctx._text = editor(self, cctx, subs) # commit subs if subs: