[PATCH 07 of 13] rebase: use tuple as `replacement` keys

Yuya Nishihara yuya at tcha.org
Sun Sep 30 08:34:08 EDT 2018


On Thu, 27 Sep 2018 19:08:39 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1537998671 -7200
> #      Wed Sep 26 23:51:11 2018 +0200
> # Node ID 79a0f8fcb5c1af9a8ad5dd292a8ef67d75b6779d
> # Parent  77b0a61c3cc5be70c3686f9b7217e59fbf98f5c7
> # EXP-Topic trackfold
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 79a0f8fcb5c1
> rebase: use tuple as `replacement` keys
> 
> Now that `cleanupnodes` support tuples as key, we update the rebase code to use
> them. No changes in the replacement tracked are introduced yet.
> 
> diff --git a/hgext/rebase.py b/hgext/rebase.py
> --- a/hgext/rebase.py
> +++ b/hgext/rebase.py
> @@ -1777,15 +1777,16 @@ def clearrebased(ui, repo, destmap, stat
>                  else:
>                      succs = (newnode,)
>                  if succs is not None:
> -                    replacements[oldnode] = succs
> +                    replacements[(oldnode,)] = succs

Somewhat related to this. Is there any reason to build replacements as a dict?
I don't think we'll ever want to lookup succs by multi-oldnodes.


More information about the Mercurial-devel mailing list