From: Eric S. Raymond Date: Thu, 13 Nov 2014 04:31:31 +0000 (-0500) Subject: Use metadata in the commit message boilerplate. X-Git-Tag: 0.6~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=2fc2c111b3641d43484d52eaeb842e656df91c54;p=src.git Use metadata in the commit message boilerplate. --- 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."