Mercurial > hg > mercurial-source
diff mercurial/cmdutil.py @ 8707:0550dfe4fca1
commit: editor reads file lists from provided context
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 01 Jun 2009 14:51:47 -0500 |
parents | b6511055d37b |
children | b9e0ddb04c5c |
line wrap: on
line diff
--- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1231,13 +1231,14 @@ except ValueError, inst: raise util.Abort(str(inst)) -def commiteditor(repo, ctx, added, updated, removed): +def commiteditor(repo, ctx): if ctx.description(): return ctx.description() - return commitforceeditor(repo, ctx, added, updated, removed) + return commitforceeditor(repo, ctx) -def commitforceeditor(repo, ctx, added, updated, removed): +def commitforceeditor(repo, ctx): edittext = [] + modified, added, removed = ctx.modified(), ctx.added(), ctx.removed() if ctx.description(): edittext.append(ctx.description()) edittext.append("") @@ -1253,9 +1254,9 @@ edittext.append(_("HG: branch '%s'") % encoding.tolocal(ctx.branch())) edittext.extend([_("HG: added %s") % f for f in added]) - edittext.extend([_("HG: changed %s") % f for f in updated]) + edittext.extend([_("HG: changed %s") % f for f in modified]) edittext.extend([_("HG: removed %s") % f for f in removed]) - if not added and not updated and not removed: + if not added and not modified and not removed: edittext.append(_("HG: no files changed")) edittext.append("") # run editor in the repository root