diff CHANGELOG @ 5979:4a09e95d29c9 stable

rewriteutil: fix broken touch of merge commits (issue6416) `rewriteutil.rewrite()` is for rewriting a linear chain of commits into a single commit, i.e. what `hg fold` does. Many of the callers passed in a single commit because they wanted to rewrite just a single commit (e.g. `hg touch`). Before this patch, the code worked by going through the commits to fold and adding up all the modified files in them, then building a `memctx` based on that. As reported in issue6416, that can lose changes in merge commits. We could probably fix that without changing the existing code too much, but it seems the easiest way is to rewrite the code so it instead creates the new commit by effectively checking out the base and then revert to the head of the chain, so that's what this patch does. It does so by using in-memory merge.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 05 Oct 2020 08:35:17 -0700
parents 30c8d8e6a7f4
children 991be5efe7cb
line wrap: on
line diff
--- a/CHANGELOG	Mon Oct 05 09:02:21 2020 -0700
+++ b/CHANGELOG	Mon Oct 05 08:35:17 2020 -0700
@@ -6,6 +6,11 @@
 
   * next: remove duplicated targets when updating from an unstable changeset
   * evolve: use "served" repo filter to guess what the server will publish
+  * touch/fold/metaedit/rewind: no longer lose changes from merge commits
+    (issue6416). As a consequence (for technical reasons), when run with
+    Mercurial 5.5 and earlier, these commands now require there to be no
+    unresolved conflicts.
+
 
 topic (0.22.2)