[PATCH STABLE] rebase: avoid RevlogError when computing obsoletenotrebased (issue5907)
Matt Harbison
mharbison72 at gmail.com
Wed Jun 6 21:33:53 EDT 2018
On Wed, 06 Jun 2018 09:31:25 -0400, Yuya Nishihara <yuya at tcha.org> wrote:
> On Wed, 06 Jun 2018 08:56:23 -0400, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1528256994 14400
>> # Tue Jun 05 23:49:54 2018 -0400
>> # Branch stable
>> # Node ID 69d1cafe75f20a1e8bf0478d715c4cdd207d8ecb
>> # Parent 79c54e7c0c5279b315e43540b98fb22c4843d79b
>> rebase: avoid RevlogError when computing obsoletenotrebased (issue5907)
>
> Queued for stable, thanks.
>
>> diff --git a/hgext/rebase.py b/hgext/rebase.py
>> --- a/hgext/rebase.py
>> +++ b/hgext/rebase.py
>> @@ -1815,7 +1815,8 @@ def _computeobsoletenotrebased(repo, reb
>> # If 'srcrev' has a successor in rebase set but none in
>> # destination (which would be catched above), we shall
>> skip it
>> # and its descendants to avoid divergence.
>> - if any(nodemap[s] in destmap for s in successors):
>> + if any(nodemap[s] in destmap for s in successors
>> + if s in nodemap):
>> obsoletewithoutsuccessorindestination.add(srcrev)
>
> I have no idea why we're taking care of missing successors until the last
> "if not successors else" condition. We might have to filter them out
> earlier?
I wondered the same thing. But obsutil.allsuccessors() says not all nodes
may be known locally. If we filter out earlier, that would seem to change
the logic of `successors.issubset(extinctnodes)` (extinctnodes are all
local), and also `if not successors`. (I have no idea if the current code
is correct, but I didn't want to overreach on stable.)
More information about the Mercurial-devel
mailing list