comparison 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
comparison
equal deleted inserted replaced
5978:bf48247af25a 5979:4a09e95d29c9
4 10.3.2 - 2021-05-28 4 10.3.2 - 2021-05-28
5 -------------------- 5 --------------------
6 6
7 * next: remove duplicated targets when updating from an unstable changeset 7 * next: remove duplicated targets when updating from an unstable changeset
8 * evolve: use "served" repo filter to guess what the server will publish 8 * evolve: use "served" repo filter to guess what the server will publish
9 * touch/fold/metaedit/rewind: no longer lose changes from merge commits
10 (issue6416). As a consequence (for technical reasons), when run with
11 Mercurial 5.5 and earlier, these commands now require there to be no
12 unresolved conflicts.
13
9 14
10 topic (0.22.2) 15 topic (0.22.2)
11 16
12 * topic: don't lose any file changes when changing topic of a merge commit 17 * topic: don't lose any file changes when changing topic of a merge commit
13 * topic: announce ext-topics-publish capability in case of SSH and HTTP too 18 * topic: announce ext-topics-publish capability in case of SSH and HTTP too