From 2fc2c111b3641d43484d52eaeb842e656df91c54 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 12 Nov 2014 23:31:31 -0500 Subject: [PATCH] Use metadata in the commit message boilerplate. --- src | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src b/src index 89977ce..e7a7073 100755 --- a/src +++ b/src @@ -570,6 +570,10 @@ def commit_method(*args): for arg in ctx.args: if not os.path.exists(arg): croak("I see no '%s' here." % arg) + metadata = History(arg) + ctx.resolve(metadata) + if ctx.is_empty(): + ctx.select_tip(metadata) trailer ="Committing {0} revision {1}.\n".format(arg, ctx.start) if not comment.edit(content="", trailer=trailer): announce("in %s, commit cancelled" % arg) @@ -579,7 +583,7 @@ def commit_method(*args): with backend.lifter(arg): backend.checkin(arg, comment.content()) if not quiet and len(args) > 1: - announce("%s -> %d" % (arg, len(History(arg)))) + announce("%s -> %d" % (arg, len(metadata))) def amend_method(*args): "Amend comments in stored revisions." -- 2.43.0