D469: rebase: initial support for multiple destinations

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Aug 29 02:53:29 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> rebase.py:822
> +            for r in rebaseset:
> +                alias = {'ALLSRC': allsrc,
> +                         'SRC': revsetlang.formatspec('%d', r)}

could pass ALLSRC in the fast-path version too, no? because the concern is not that that calcularing "allsrc" is costly, i assume, but that running the revset over all the revisions is

> rebase.py:824
> +                         'SRC': revsetlang.formatspec('%d', r)}
> +                destset = repo.anyrevs([destf], user=True, localalias=alias)
> +                size = len(destset)

anyrevs() doesn't seem to make much sense here. Why not let localrepo.revs() and localrepo.set() accept "user" and "localalias" arguments too? I realize it's more code, but it seem to make more sense. Unless this is just temporary and you're planning on passing a longer list here later.

> rebase.py:824
> +                         'SRC': revsetlang.formatspec('%d', r)}
> +                destset = repo.anyrevs([destf], user=True, localalias=alias)
> +                size = len(destset)

The destination revset is resolved earlier than I had expected. Or at least I expected it to be evaluated later, *as well*, I suppose.

Let's say my revset is "successors(parents(SRC))" (i.e. a naive attempt at "hg evolve") and my graph looks like this:

  o A'
  | o C
  | o B
  | x A
  |/
  o

If I then do "hg rebase -s B -d <as above>", it seems like only B would be rebased. Do you have plans for making it so C gets rebased too?

> test-rebase-dest.t:295
> +
> +  $ rebasewithdag -s 'B+C+D' -d 'map(SRC, "B:C,C:D")' <<'EOS'
> +  > B C D

Where is "map" defined?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D469

To: quark, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list