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]) |