Mercurial > evolve
comparison hgext/evolve.py @ 620:232536f5c987 compat-hg2.3
use comments to combine commit messages in fold
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 22 Nov 2012 11:30:36 +0100 |
parents | f50f8da7a077 |
children | e50a5d9a6cbf 07d813af96c4 |
comparison
equal
deleted
inserted
replaced
619:f50f8da7a077 | 620:232536f5c987 |
---|---|
2220 lock = repo.lock() | 2220 lock = repo.lock() |
2221 tr = repo.transaction('touch') | 2221 tr = repo.transaction('touch') |
2222 try: | 2222 try: |
2223 allctx = [repo[r] for r in revs] | 2223 allctx = [repo[r] for r in revs] |
2224 targetphase = max(c.phase() for c in allctx) | 2224 targetphase = max(c.phase() for c in allctx) |
2225 msg = '\n\n***\n\n'.join(c.description() for c in allctx) | 2225 msgs = ["HG: This is a fold of %d changesets." % len(allctx)] |
2226 commitopts = {'message': msg} | 2226 msgs += ["HG: Commit message of changeset %s.\n\n%s\n" % |
2227 (c.rev(), c.description()) for c in allctx] | |
2228 commitopts = {'message': "\n".join(msgs)} | |
2227 commitopts['edit'] = True | 2229 commitopts['edit'] = True |
2228 newid, _ = rewrite(repo, root, allctx, head, | 2230 newid, _ = rewrite(repo, root, allctx, head, |
2229 [root.p1().node(), root.p2().node()], | 2231 [root.p1().node(), root.p2().node()], |
2230 commitopts=commitopts) | 2232 commitopts=commitopts) |
2231 phases.retractboundary(repo, targetphase, [newid]) | 2233 phases.retractboundary(repo, targetphase, [newid]) |