yuja added a comment.
> What about making the argument a revset instead of a branch name. You can get the same result `merge(branch("foo")` but have a more expressive result `merge(only(4.8, 4.7))` ? That's basically a simpler form of my `filter()` proposal. The problem of `merge(branch("foo"))` is that it's ambiguous which revision the expression will be tested against. It could be expressed as `merge(p2=branch("foo"))` to disambiguate, but this syntax isn't generic enough to express the `samebranch=True` constraint. So if we want a truly expressive syntax, we'll need something like a lambda function. filtereach(merge(), p2(_) & branch("foo")) filtereach(merge(), samebranch(parents(_)) I agreed with Angel in that `merge(withbranch=name)` would be useful enough to have a dedicated syntax, but I'm open to other ideas like `merge(p1=expr, p2=expr)`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5495 To: angel.ezquerra, #hg-reviewers Cc: lothiraldan, pulkit, yuja, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel