pull requests: default target branch

Mads Kiilerich mads at kiilerich.com
Tue Feb 17 22:21:25 EST 2015


On 02/14/2015 09:23 PM, Thomas De Schampheleire wrote:
> Hi Mads,
>
> On Thu, Jan 29, 2015 at 2:28 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>> 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.
> Could you point me to the relevant commits, or aren't they on
> https://bitbucket.org/Unity-Technologies/kallithea/commits/all yet?

I haven't published them. They are mixed up with very internal stuff. 
Your input here might help finding some parts that could be of general use.

But basically, it is just passes the branch name to _get_repo_refs which 
use that information when creating the list of targets.

/Mads


More information about the kallithea-general mailing list