[PATCH STABLE] rebase: avoid RevlogError when computing obsoletenotrebased (issue5907)

Yuya Nishihara yuya at tcha.org
Wed Jun 6 09:31:25 EDT 2018


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?
Whichever way is correct, this patch should be an improvement.


More information about the Mercurial-devel mailing list