D5496: revset: add "samebranch" keyword argument to the merge revset
angel.ezquerra (Angel Ezquerra)
phabricator at mercurial-scm.org
Wed Jan 16 13:11:17 EST 2019
angel.ezquerra added a comment.
In https://phab.mercurial-scm.org/D5496#82671, @yuja wrote:
> > > `[, samebranch]` or [, samebranch=False]`.
> >
> > I guess that means:
> >
> > @predicate('merge([withbranch [, samebranch=None]])', safe=True)
> >
> > Right? (I realized that it is incorrect to say that samebranch's default value is False).
>
> 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."
In https://phab.mercurial-scm.org/D5496#82671, @yuja wrote:
> > > `[, samebranch]` or [, samebranch=False]`.
> >
> > I guess that means:
> >
> > @predicate('merge([withbranch [, samebranch=None]])', safe=True)
> >
> > Right? (I realized that it is incorrect to say that samebranch's default value is False).
>
> 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 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?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5496
To: angel.ezquerra, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list