D5496: revset: add "samebranch" keyword argument to the merge revset

Yuya Nishihara yuya at tcha.org
Thu Jan 17 09:20:14 EST 2019


>   > Okay, I didn't notice that. And it's tricky to map `samebranch=False` to
>   >  "different branch" constraint. I would read it as "I don't care whether
>   >  the branches are the same or not."
>   >
>   > We can instead express it as `merge() - merge(samebranch=True)`.
>   
>   Do you mean that the flag should only indicate whether you want to hide the same branch merges?

I just mean tri-state bool is confusing. `<whatever>=False` sounds like we
don't care about the `<whatever>` condition.

> I guess that is OK too, since the main use case for this flag is to hide the merge from the same branch. However I think we should change the flag name then. Perhaps "hidesame"? Or "includesame" or "includeself", defaulting to True? Any ideas?

It could be an argument taking a string like `'same'`, but I can't think
of nice names. What's the best term describing a merge between two named
branches?


More information about the Mercurial-devel mailing list