Commits

Denis Laxalde committed 232536f

use comments to combine commit messages in fold

Comments (0)

Files changed (2)

         try:
             allctx = [repo[r] for r in revs]
             targetphase = max(c.phase() for c in allctx)
-            msg = '\n\n***\n\n'.join(c.description() for c in allctx)
-            commitopts = {'message': msg}
+            msgs = ["HG: This is a fold of %d changesets." % len(allctx)]
+            msgs += ["HG: Commit message of changeset %s.\n\n%s\n" %
+                     (c.rev(), c.description()) for c in allctx]
+            commitopts = {'message': "\n".join(msgs)}
             commitopts['edit'] = True
             newid, _ = rewrite(repo, root, allctx, head,
                              [root.p1().node(), root.p2().node()],

tests/test-evolve.t

   $ hg log -r 11 --template '{desc}\n'
   add 1
   
-  ***
   
   conflict
   $ hg debugrebuildstate
   $ hg log -r 12 --template '{desc}\n'
   add 4
   
-  ***
   
   add 3
   
-  ***
   
   add 1
   
-  ***
   
   conflict
   $ hg debugrebuildstate