[petsc-dev] bitbucket giving wrong information

Barry Smith bsmith at mcs.anl.gov
Thu Dec 4 21:07:03 CST 2014


> On Dec 4, 2014, at 6:00 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
>>   It cannot be a choose, because I have to be able to find it without asking that person what they chose. That is it has to come automatically from the pull request. I suggest then simply
>> 
>>    pullrequest-number (where number is the number of the pull request).   
>> 
>>  Or possibly 
>> 
>>     myuserid/pullrequest-number  (so everyone knows I am the one who made the local branch for the pull request)
>> 
>>  Comments, improvements?
> 
> You want to get from PR to branch name or from branch name to PR?

    Given a PR I want to find the (new) local branch that someone made in response to it. Note that this new local branch may not yet have been merged into next etc or may have been.

    It seems to me the simplest way is simply to include the PR number into the new local branch name that person made. I don't see why we need any of the complicated goobly guck below if we just follow my proposal above. Nor do I see any harm in my proposal. If you want to provide also a description of the pull request functionality we could have 

     myuserid/pullrequest-number-mychosendescription

  I see absolutely no reason not to include both the string pullrequest (so we know it is a special kind of branch) and the PR number (so we trivially know what pull request it is associated with).

   Comments?

  Barry

  "Annotating the PR # into the merge commit" as an additional convention is fine with me also but is orthogonal to the finding above."


> 
> PR to branch name:
> 
>  git branch -r --contains $last_commit_in_PR
> 
>  or click on the commit and see the branch name on the right
> 
>  or (if the branch has been merged to 'next' and a convention of
>    annotating the PR # into the merge commit has been followed),
> 
>    git log --grep 'PR #123' next
> 
> 
> Branch name to PR is not automatic even for in-repo branches, but if the
> branch has been merged to 'next' with recommended annotation, this works
> 
>  git log --grep the-branch-name next




More information about the petsc-dev mailing list