Mercurial > hg-stable
changeset 8994:4a1187d3cb00
commit: report modified subrepos in commit editor
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 01 Jul 2009 01:05:24 -0500 |
parents | 46441934c585 |
children | 7b19cda0fa10 |
files | mercurial/cmdutil.py mercurial/localrepo.py |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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])
--- 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: