]> thyrsus.com Git - src.git/commitdiff
Use metadata in the commit message boilerplate.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 13 Nov 2014 04:31:31 +0000 (23:31 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 13 Nov 2014 04:31:31 +0000 (23:31 -0500)
src

diff --git a/src b/src
index 89977ce381b779b9a1c5c1b5c689c59c26ae5994..e7a707312204b46f318d3fcd4036a2f945166473 100755 (executable)
--- 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."