pull requests: default target branch

Mads Kiilerich mads at kiilerich.com
Thu Jan 29 08:28:24 EST 2015


On 01/29/2015 12:08 PM, Thomas De Schampheleire wrote:
> Hi,
>
> When creating a pull request in Kallithea, the tip (or specified
> revision) in the originating repository is compared with the
> destination repo's tip.
>
> When having several release branches, this choice could be confusing:
> suppose someone makes changes on the default branch and creates a pull
> request. If the last change in the target repo happens to be on the
> branch of another release, the list of revisions is huge. The creator
> of the pull request may not immediately realize that he should select
> the default branch explicitly.
>
> There already exists the concept of 'landing revision' but it does not
> seem to be used here. A proposal is:
> - for the source, use the current tip (this is typically the change of
> the developer)
> - for the target, use the landing revision (which could be changed to
> the default branch in my case).
>
> An alternative is:
> - for the source, use the current tip (this is typically the change of
> the developer)
> - for the target, use the same branch as the source is on, if it
> exists, otherwise use the landing revision (or the current tip).

Yes, I implemented some heuristics that works for us. The most generic 
ones have been upstreamed - in addition to that I have custom hacks to 
help it make suggestions based on our branch naming scheme.

It totally makes sense to use the configured landing revision instead of 
hardcoding tip.

'Matching branch name' might also make sense _if_ using different 
repositories. If it is in the same repository, it would probably be 
better to use anything else ;-)

(This same-same ting reminds me that we should do something to prevent 
creation of empty PRs ;-) )

/Mads



More information about the kallithea-general mailing list