annotate relnotes/next @ 45375:8c466bcb0879

revert: remove dangerous `parents` argument from `cmdutil.revert()` As we found out the hard way (thanks to spectral@ for figuring it out!), `cmdutil.revert()`'s `parents` argument must be `repo.dirstate.parents()` or things may go wrong. We had an extension that passed in the target commit as the first parent. The `hg split` command from the evolve extension seems to have made the same mistake, but I haven't looked carefully. The problem is that `cmdutil._performrevert()` calls `dirstate.normal()` on reverted files if the commit to revert to equals the first parent. So if you pass in `ctx=foo` and `parents=(foo.node(), nullid)`, then `dirstate.normal()` will be called for the revert files, even though they might not be clean in the working copy. There doesn't seem to be any reason, other than a tiny performance benefit, to passing the `parents` around instead of looking them up again in `cmdutil._performrevert()`, so that's what this patch does. Differential Revision: https://phab.mercurial-scm.org/D8925
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 10 Aug 2020 21:46:47 -0700
parents 5178dd2233d0
children 2c86b9587740
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42271
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
1 == New Features ==
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
2
45369
5178dd2233d0 rename: add support for --at-rev, which marks as copy and removes the source
Martin von Zweigbergk <martinvonz@google.com>
parents: 45240
diff changeset
3 * `hg mv -A` can now be used with `--at-rev`. It behaves just like
5178dd2233d0 rename: add support for --at-rev, which marks as copy and removes the source
Martin von Zweigbergk <martinvonz@google.com>
parents: 45240
diff changeset
4 `hg cp -A --at-rev`, i.e. it marks the destination as a copy of the
5178dd2233d0 rename: add support for --at-rev, which marks as copy and removes the source
Martin von Zweigbergk <martinvonz@google.com>
parents: 45240
diff changeset
5 source whether or not the source still exists (but the source must
5178dd2233d0 rename: add support for --at-rev, which marks as copy and removes the source
Martin von Zweigbergk <martinvonz@google.com>
parents: 45240
diff changeset
6 exist in the parent revision).
45169
3496b5f24371 relnotes: extend
Joerg Sonnenberger <joerg@bec.de>
parents: 45062
diff changeset
7
45189
045f5361bd12 relnotes: make spacing before new section consistent
Manuel Jacob <me@manueljacob.de>
parents: 45169
diff changeset
8
44367
9dab3fa64325 copy: add experimental support for marking committed copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 44365
diff changeset
9 == New Experimental Features ==
44343
8561ad49915d revset: add a revset for parents in merge state
Martin von Zweigbergk <martinvonz@google.com>
parents: 44289
diff changeset
10
45191
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
11
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
12
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
13 == Bug Fixes ==
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
14
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
15
45189
045f5361bd12 relnotes: make spacing before new section consistent
Manuel Jacob <me@manueljacob.de>
parents: 45169
diff changeset
16
42271
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
17 == Backwards Compatibility Changes ==
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
18
45191
fc54f52779dd relnotes: add release notes for relevant changes I did since the 5.4 release
Manuel Jacob <me@manueljacob.de>
parents: 45190
diff changeset
19
44396
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44392
diff changeset
20
42271
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
21 == Internal API Changes ==
0ed293a3f00e releasenotes: add a file in which to record release notes
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
22