Mercurial > hg
comparison hgweb.cgi @ 44646:5f9c917e3b50
phabricator: teach `getoldnodedrevmap()` to handle folded reviews
The tricky part here is reasoning through all of the possible predecessor
scenarios. In the typical case of submitting a folded range and then
resubmitting it (also folded), filtering the list of commits for the diff stored
on Phabricator through the local predecessor list for each single node will
result in the typical 1:1 mapping to the old node.
There are edge cases like using `hg fold` within the range prior to
resubmitting, that will result in mapping to multiple old nodes. In that case,
the first direct predecessor is needed for the base of the diff, and the last
direct predecessor is needed for the head of the diff in order to make sure that
the entire range is included in the diff content. And none of this matters for
commits in the middle of the range, as they are never used.
Fortunately the only crucial thing here is the `drev` number for each node. For
these complicated cases where there are multiple old nodes, simply ignore them
all. This will cause `createdifferentialrevision()` to generate a new diff
(within the same Differential), and avoids complicating the code.
Differential Revision: https://phab.mercurial-scm.org/D8311
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 16 Mar 2020 13:36:12 -0400 |
parents | 47ef023d0165 |
children | d58a205d0672 |
comparison
equal
deleted
inserted
replaced
44645:419fec8237b7 | 44646:5f9c917e3b50 |
---|