From patchwork Sun Mar 20 22:18:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [evolve-ext] split: reuse the pre-split commit message for the split ones From: =?utf-8?q?Jordi_Guti=C3=A9rrez_Hermoso?= X-Patchwork-Id: 13988 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 20 Mar 2016 18:18:53 -0400 # HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1458511862 14400 # Sun Mar 20 18:11:02 2016 -0400 # Node ID f3c32a01d13f8bf64d29a758c6deb6dc8ee90466 # Parent 9bcb24c3ba8d2b5a7082ae61ac2193e867234822 split: reuse the pre-split commit message for the split ones The original commit message is probably relevant in some way for the split commit messages. It is helpful for the user to have access to the pre-split commit message, so we provide the original commit message. This is more helpful than completely dropping the original commit message during a split. diff --git a/hgext/evolve.py b/hgext/evolve.py --- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -2766,6 +2766,16 @@ def cmdsplit(ui, repo, *revs, **opts): r = ctx.rev() disallowunstable = not obsolete.isenabled(repo, obsolete.allowunstableopt) + + # We'll re-use the same commit message for all split commits, + # as it's a reasonable starting point for writing the commit + # messages for each chunk. + opts['message'] = ( + "HG: This is the original pre-split commit message. " + "Edit it as appropriate.\n\n%s" + ) % ctx.description() + opts['edit'] = True + if disallowunstable: # XXX We should check head revs if repo.revs("(%d::) - %d", rev, rev):