Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Gilles

On Thu, 9 Mar 2017 12:01:08 -0600, Matt Sicker wrote:

Try viewing the log like this:

git log --oneline --decorate --graph

It might be farther back in time,


Oh yes, of course, you are right.
I tested this with a fairly old pull request!

Thanks and sorry for the noise,
Gilles


so the added commits won't show up at the
top of the normal git log format.

On 9 March 2017 at 11:48, Gilles  
wrote:



On Thu, 9 Mar 2017 11:34:42 -0600, Matt Sicker wrote:

A merge commit is an additional commit unless you squash what 
you're
merging. The entire history should be available. You can use --ff 
to only
allow a fast forward commit so it doesn't add a merge commit, but 
then the
branch you're merging has be to rebased on the one you're merging 
into.




I did

$ git pull github pull/50/head

in a local copy of Commons Math "master" branch.

The command performed a single commit (a "merge") and there is no
trace that the change(s) were coming from someone else (a GitHub 
user):


  https://github.com/apache/commons-math/pull/50/commits/b32cd
65abb0497fa35ca407430f20d562f604ed7

$ git log
commit 68fdf0620ecfc708a940cfd02451986cc42fde5b
Merge: 37c3d36c8 b32cd65ab
Author: Gilles 
Date:   Thu Mar 9 16:01:07 2017 +0100

Merge commit 'refs/pull/50/head' of 
https://github.com/apache/comm

ons-math into fix-MATH-1402

[No other commit related to that action.]


Gilles




On 9 March 2017 at 09:08, Gilles  
wrote:


On Thu, 9 Mar 2017 09:38:55 -0500, Rob Tompkins wrote:


On Mar 9, 2017, at 8:08 AM, Gilles  
wrote:




On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:

The "write to a PR branch" was something I mentioned in a 
different

email.

If you want a single command to merge a PR into master, 
assuming

you've
already set up "github" as your github remote:



$ git remote -v
githubhttps://github.com/apache/commons-math.git (fetch)
githubhttps://github.com/apache/commons-math.git (push)
origin
https://git-wip-us.apache.org/repos/asf/commons-math.git

(fetch)
origin
https://git-wip-us.apache.org/repos/asf/commons-math.git

(push)


git pull github pull/42

git push

Something like that should work.



$ git pull github pull/50
fatal: Couldn't find remote ref pull/50

Am I missing something?


Try


git pull github pull/#/head



It successfully performs a merge into the current branch, but does
not preserve the commit history (only the merge appears in "git 
log").


IIRC, the generated instructions[1] would lead to the 
contributor's

commit being referenced properly.

Regards,
Gilles

[1] Such as in:
  https://issues.apache.org/jira/browse/NUMBERS-4




-Rob


Regards,


Gilles

[...]










-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Matt Sicker
Try viewing the log like this:

git log --oneline --decorate --graph

It might be farther back in time, so the added commits won't show up at the
top of the normal git log format.

On 9 March 2017 at 11:48, Gilles  wrote:

> On Thu, 9 Mar 2017 11:34:42 -0600, Matt Sicker wrote:
>
>> A merge commit is an additional commit unless you squash what you're
>> merging. The entire history should be available. You can use --ff to only
>> allow a fast forward commit so it doesn't add a merge commit, but then the
>> branch you're merging has be to rebased on the one you're merging into.
>>
>
> I did
>
> $ git pull github pull/50/head
>
> in a local copy of Commons Math "master" branch.
>
> The command performed a single commit (a "merge") and there is no
> trace that the change(s) were coming from someone else (a GitHub user):
>
>   https://github.com/apache/commons-math/pull/50/commits/b32cd
> 65abb0497fa35ca407430f20d562f604ed7
>
> $ git log
> commit 68fdf0620ecfc708a940cfd02451986cc42fde5b
> Merge: 37c3d36c8 b32cd65ab
> Author: Gilles 
> Date:   Thu Mar 9 16:01:07 2017 +0100
>
> Merge commit 'refs/pull/50/head' of https://github.com/apache/comm
> ons-math into fix-MATH-1402
>
> [No other commit related to that action.]
>
>
> Gilles
>
>
>
>
>> On 9 March 2017 at 09:08, Gilles  wrote:
>>
>> On Thu, 9 Mar 2017 09:38:55 -0500, Rob Tompkins wrote:
>>>
>>> On Mar 9, 2017, at 8:08 AM, Gilles  wrote:

>
> On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
>
>> The "write to a PR branch" was something I mentioned in a different
>> email.
>>
>> If you want a single command to merge a PR into master, assuming
>> you've
>> already set up "github" as your github remote:
>>
>>
> $ git remote -v
> githubhttps://github.com/apache/commons-math.git (fetch)
> githubhttps://github.com/apache/commons-math.git (push)
> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
> (fetch)
> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
> (push)
>
>
> git pull github pull/42
>> git push
>>
>> Something like that should work.
>>
>>
> $ git pull github pull/50
> fatal: Couldn't find remote ref pull/50
>
> Am I missing something?
>
>
> Try

 git pull github pull/#/head


>>> It successfully performs a merge into the current branch, but does
>>> not preserve the commit history (only the merge appears in "git log").
>>>
>>> IIRC, the generated instructions[1] would lead to the contributor's
>>> commit being referenced properly.
>>>
>>> Regards,
>>> Gilles
>>>
>>> [1] Such as in:
>>>   https://issues.apache.org/jira/browse/NUMBERS-4
>>>
>>>
>>>
>>>
>>> -Rob

 Regards,

> Gilles
>
> [...]
>
>>
>>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Matt Sicker 


Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Gilles

On Thu, 9 Mar 2017 11:34:42 -0600, Matt Sicker wrote:

A merge commit is an additional commit unless you squash what you're
merging. The entire history should be available. You can use --ff to 
only
allow a fast forward commit so it doesn't add a merge commit, but 
then the
branch you're merging has be to rebased on the one you're merging 
into.


I did

$ git pull github pull/50/head

in a local copy of Commons Math "master" branch.

The command performed a single commit (a "merge") and there is no
trace that the change(s) were coming from someone else (a GitHub user):

  
https://github.com/apache/commons-math/pull/50/commits/b32cd65abb0497fa35ca407430f20d562f604ed7


$ git log
commit 68fdf0620ecfc708a940cfd02451986cc42fde5b
Merge: 37c3d36c8 b32cd65ab
Author: Gilles 
Date:   Thu Mar 9 16:01:07 2017 +0100

Merge commit 'refs/pull/50/head' of 
https://github.com/apache/commons-math into fix-MATH-1402


[No other commit related to that action.]


Gilles




On 9 March 2017 at 09:08, Gilles  
wrote:



On Thu, 9 Mar 2017 09:38:55 -0500, Rob Tompkins wrote:

On Mar 9, 2017, at 8:08 AM, Gilles  
wrote:


On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
The "write to a PR branch" was something I mentioned in a 
different

email.

If you want a single command to merge a PR into master, assuming 
you've

already set up "github" as your github remote:



$ git remote -v
githubhttps://github.com/apache/commons-math.git (fetch)
githubhttps://github.com/apache/commons-math.git (push)
originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
(fetch)
originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
(push)



git pull github pull/42
git push

Something like that should work.



$ git pull github pull/50
fatal: Couldn't find remote ref pull/50

Am I missing something?



Try

git pull github pull/#/head



It successfully performs a merge into the current branch, but does
not preserve the commit history (only the merge appears in "git 
log").


IIRC, the generated instructions[1] would lead to the contributor's
commit being referenced properly.

Regards,
Gilles

[1] Such as in:
  https://issues.apache.org/jira/browse/NUMBERS-4





-Rob

Regards,

Gilles

[...]








-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Matt Sicker
A merge commit is an additional commit unless you squash what you're
merging. The entire history should be available. You can use --ff to only
allow a fast forward commit so it doesn't add a merge commit, but then the
branch you're merging has be to rebased on the one you're merging into.

On 9 March 2017 at 09:08, Gilles  wrote:

> On Thu, 9 Mar 2017 09:38:55 -0500, Rob Tompkins wrote:
>
>> On Mar 9, 2017, at 8:08 AM, Gilles  wrote:
>>>
>>> On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
 The "write to a PR branch" was something I mentioned in a different
 email.

 If you want a single command to merge a PR into master, assuming you've
 already set up "github" as your github remote:

>>>
>>> $ git remote -v
>>> githubhttps://github.com/apache/commons-math.git (fetch)
>>> githubhttps://github.com/apache/commons-math.git (push)
>>> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
>>> (fetch)
>>> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git
>>> (push)
>>>
>>>
 git pull github pull/42
 git push

 Something like that should work.

>>>
>>> $ git pull github pull/50
>>> fatal: Couldn't find remote ref pull/50
>>>
>>> Am I missing something?
>>>
>>>
>> Try
>>
>> git pull github pull/#/head
>>
>
> It successfully performs a merge into the current branch, but does
> not preserve the commit history (only the merge appears in "git log").
>
> IIRC, the generated instructions[1] would lead to the contributor's
> commit being referenced properly.
>
> Regards,
> Gilles
>
> [1] Such as in:
>   https://issues.apache.org/jira/browse/NUMBERS-4
>
>
>
>
>> -Rob
>>
>> Regards,
>>> Gilles
>>>
>>> [...]

>>>
>>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Matt Sicker 


Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Gilles

On Thu, 9 Mar 2017 09:38:55 -0500, Rob Tompkins wrote:
On Mar 9, 2017, at 8:08 AM, Gilles  
wrote:



On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
The "write to a PR branch" was something I mentioned in a different 
email.


If you want a single command to merge a PR into master, assuming 
you've

already set up "github" as your github remote:


$ git remote -v
githubhttps://github.com/apache/commons-math.git (fetch)
githubhttps://github.com/apache/commons-math.git (push)
originhttps://git-wip-us.apache.org/repos/asf/commons-math.git 
(fetch)
originhttps://git-wip-us.apache.org/repos/asf/commons-math.git 
(push)




git pull github pull/42
git push

Something like that should work.


$ git pull github pull/50
fatal: Couldn't find remote ref pull/50

Am I missing something?



Try

git pull github pull/#/head


It successfully performs a merge into the current branch, but does
not preserve the commit history (only the merge appears in "git log").

IIRC, the generated instructions[1] would lead to the contributor's
commit being referenced properly.

Regards,
Gilles

[1] Such as in:
  https://issues.apache.org/jira/browse/NUMBERS-4




-Rob


Regards,
Gilles


[...]





-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Rob Tompkins


> On Mar 9, 2017, at 8:08 AM, Gilles  wrote:
> 
>> On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
>> The "write to a PR branch" was something I mentioned in a different email.
>> 
>> If you want a single command to merge a PR into master, assuming you've
>> already set up "github" as your github remote:
> 
> $ git remote -v
> githubhttps://github.com/apache/commons-math.git (fetch)
> githubhttps://github.com/apache/commons-math.git (push)
> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git (fetch)
> originhttps://git-wip-us.apache.org/repos/asf/commons-math.git (push)
> 
>> 
>> git pull github pull/42
>> git push
>> 
>> Something like that should work.
> 
> $ git pull github pull/50
> fatal: Couldn't find remote ref pull/50
> 
> Am I missing something?
> 

Try

git pull github pull/#/head

-Rob

> Regards,
> Gilles
> 
>> [...]
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-09 Thread Gilles

On Wed, 8 Mar 2017 10:37:44 -0600, Matt Sicker wrote:
The "write to a PR branch" was something I mentioned in a different 
email.


If you want a single command to merge a PR into master, assuming 
you've

already set up "github" as your github remote:


$ git remote -v
github  https://github.com/apache/commons-math.git (fetch)
github  https://github.com/apache/commons-math.git (push)
origin  https://git-wip-us.apache.org/repos/asf/commons-math.git (fetch)
origin  https://git-wip-us.apache.org/repos/asf/commons-math.git (push)



git pull github pull/42
git push

Something like that should work.


$ git pull github pull/50
fatal: Couldn't find remote ref pull/50

Am I missing something?

Regards,
Gilles


[...]



-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-08 Thread Matt Sicker
The "write to a PR branch" was something I mentioned in a different email.

If you want a single command to merge a PR into master, assuming you've
already set up "github" as your github remote:

git pull github pull/42
git push

Something like that should work. Since you're not running the git command
on git.apache.org, there's no single command do this really since you have
to pull and push regardless.

On 8 March 2017 at 05:10, Gilles  wrote:

> Hi.
>
> On Tue, 7 Mar 2017 22:06:11 -0600, Matt Sicker wrote:
>
>> Found this link while trying to remember how to do this:
>>
>> https://help.github.com/articles/checking-out-pull-requests-locally/
>>
>> Same docs as above, just from the source. It sounds like you can't write
>> to
>> a PR branch even if the author allows it, but the docs could be out of
>> date
>> (it happens!).
>>
>
> 1. I don't want to "write to a PR branch"; my question was about getting
>the PR automatically merged in a single command (as opposed to locally
>create the branch).
> 2. The result of the actions listed below was to create a local branch with
>the contents of the PR. Of course (?), I could modify that local branch.
>
> Gilles
>
>
>> On 2 March 2017 at 09:52, Gilles  wrote:
>>
>> On Thu, 2 Mar 2017 09:35:53 -0600, Matt Sicker wrote:
>>>
>>> Is the different behavior caused by svn versus git mirroring?


>>> The "Math" and "Numbers" projects both use git.
>>>
>>> Gilles
>>>
>>> That read-only branch feature is really cool.
>>>
 Some of this info might be
 useful to include in the template readme files and such for commons.


>>>
>>> On 2 March 2017 at 06:09, Gilles  wrote:

 On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:

>
> This info (when validated) should be added to the Wiki:
>
>>
>> https://wiki.apache.org/commons/UsingGIT
>>
>> ...
>>
>> Oh, it already is there at the end
>>
>>
>> Indeed, there is information there.
> That works:
>   $ git fetch github pull/72/head:fix-foo-in-bar
>
> But is it simpler to
>  1. remember the syntax
>  2. go to the GitHub site (following the link "manually" posted by
> the contributor on the JIRA page)
>  3. figure out what part of the GitHub page contains the string
> for replacing "fix-foo-in-bar"
>  4. copy/paste it in a console
>  5. run the above command
>  6. merge the branch created by the above command
> than have the full command posted automatically on the JIRA page,
> so that the committer can do everything in one go?
>
> Note that the command above is not the same as the syntax provided
> in the automatic posts ("fetch" vs "pull").
>
> Question is still: Why different behaviours of the GitHub mirrors?
> Do we want this fixed?
> How?
>
>
> Thanks,
> Gilles
>
>
>
> On 2 March 2017 at 10:50, Gilles  wrote:
>
>
>> On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:
>>
>>>
>>>
>>> Normally the GitHub email gives you the proper command to use to pull
 the
 PR into your local git which you can merge and push (which merges
 the
 PR
 once GitHub gets updated from apache.org).

 As for making sure that email gets sent, if it's not, file an INFRA
 ticket
 about it. I've never tried it, but this might work:

 git pull https://github.com/apache/commons-math/pull/55



>>> $ git pull https://github.com/apache/commons-math/pull/55
>>> remote: Not Found
>>> fatal: repository 'https://github.com/apache/commons-math/pull/55/'
>>> not
>>> found
>>>
>>> If you add .diff or .patch to the end of the URL, it gives you a diff
>>>
>>> that
 you can manually apply. The .diff URL appears to be a normal diff
 while
 the
 .patch URL is the output of "git format-patch". So, if you download
 <
 https://github.com/apache/commons-math/pull/55.patch> and run "git
 apply
 55.patch", that'll commit it properly as if you merged the PR
 itself I
 think (it'll set the commit author properly at least for proper
 historical
 attribution).



>>> Thanks, that could be a (sub-optimal) solution.
>>>
>>> Also, adding a commit message somewhere (e.g., a follow up empty
>>> commit
>>>
>>> or
 a changelog entry commit) containing the phrase "this closes #55"
 (or
 maybe
 just "closes #55"; it's pretty loose) is enough to close the PR, but
 merging it should close it automatically.



>>> Yes, I knew that, because the notification, when it gets sent,
>>> 

Re: [ALL][Math] git pull requests: how?

2017-03-08 Thread Gilles

Hi.

On Tue, 7 Mar 2017 22:06:11 -0600, Matt Sicker wrote:

Found this link while trying to remember how to do this:

https://help.github.com/articles/checking-out-pull-requests-locally/

Same docs as above, just from the source. It sounds like you can't 
write to
a PR branch even if the author allows it, but the docs could be out 
of date

(it happens!).


1. I don't want to "write to a PR branch"; my question was about 
getting
   the PR automatically merged in a single command (as opposed to 
locally

   create the branch).
2. The result of the actions listed below was to create a local branch 
with
   the contents of the PR. Of course (?), I could modify that local 
branch.


Gilles



On 2 March 2017 at 09:52, Gilles  
wrote:



On Thu, 2 Mar 2017 09:35:53 -0600, Matt Sicker wrote:


Is the different behavior caused by svn versus git mirroring?



The "Math" and "Numbers" projects both use git.

Gilles

That read-only branch feature is really cool.

Some of this info might be
useful to include in the template readme files and such for 
commons.





On 2 March 2017 at 06:09, Gilles  
wrote:


On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:


This info (when validated) should be added to the Wiki:


https://wiki.apache.org/commons/UsingGIT

...

Oh, it already is there at the end



Indeed, there is information there.
That works:
  $ git fetch github pull/72/head:fix-foo-in-bar

But is it simpler to
 1. remember the syntax
 2. go to the GitHub site (following the link "manually" posted by
the contributor on the JIRA page)
 3. figure out what part of the GitHub page contains the string
for replacing "fix-foo-in-bar"
 4. copy/paste it in a console
 5. run the above command
 6. merge the branch created by the above command
than have the full command posted automatically on the JIRA page,
so that the committer can do everything in one go?

Note that the command above is not the same as the syntax provided
in the automatic posts ("fetch" vs "pull").

Question is still: Why different behaviours of the GitHub mirrors?
Do we want this fixed?
How?


Thanks,
Gilles



On 2 March 2017 at 10:50, Gilles  
wrote:




On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:



Normally the GitHub email gives you the proper command to use 
to pull

the
PR into your local git which you can merge and push (which 
merges the

PR
once GitHub gets updated from apache.org).

As for making sure that email gets sent, if it's not, file an 
INFRA

ticket
about it. I've never tried it, but this might work:

git pull https://github.com/apache/commons-math/pull/55




$ git pull https://github.com/apache/commons-math/pull/55
remote: Not Found
fatal: repository 
'https://github.com/apache/commons-math/pull/55/'

not
found

If you add .diff or .patch to the end of the URL, it gives you a 
diff



that
you can manually apply. The .diff URL appears to be a normal 
diff

while
the
.patch URL is the output of "git format-patch". So, if you 
download <
https://github.com/apache/commons-math/pull/55.patch> and run 
"git

apply
55.patch", that'll commit it properly as if you merged the PR 
itself I

think (it'll set the commit author properly at least for proper
historical
attribution).




Thanks, that could be a (sub-optimal) solution.

Also, adding a commit message somewhere (e.g., a follow up empty 
commit



or
a changelog entry commit) containing the phrase "this closes 
#55" (or

maybe
just "closes #55"; it's pretty loose) is enough to close the 
PR, but

merging it should close it automatically.




Yes, I knew that, because the notification, when it gets sent, 
contains
all the information necessary to handle to request (and 
additionally,

the
JIRA issue will be updated automatically too).

Hence that would be the preferred solution.

I still wonder why the various Commons projects (those managed 
by git

and
having a GitHub mirror) behave differently.


Regards,
Gilles


On 1 March 2017 at 17:53, Gilles  
wrote:




Hi.



How should the project be configured such that the request
posted here:
  https://issues.apache.org/jira/browse/MATH-1405
is as easy to handle as the one posted here:
  https://issues.apache.org/jira/browse/NUMBERS-4
?

Thanks,
Gilles









-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-07 Thread Matt Sicker
Found this link while trying to remember how to do this:

https://help.github.com/articles/checking-out-pull-requests-locally/

Same docs as above, just from the source. It sounds like you can't write to
a PR branch even if the author allows it, but the docs could be out of date
(it happens!).

On 2 March 2017 at 09:52, Gilles  wrote:

> On Thu, 2 Mar 2017 09:35:53 -0600, Matt Sicker wrote:
>
>> Is the different behavior caused by svn versus git mirroring?
>>
>
> The "Math" and "Numbers" projects both use git.
>
> Gilles
>
> That read-only branch feature is really cool.
>> Some of this info might be
>> useful to include in the template readme files and such for commons.
>>
>
> Since the template is the same for all git projects
>
>
>
>> On 2 March 2017 at 06:09, Gilles  wrote:
>>
>> On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:
>>>
>>> This info (when validated) should be added to the Wiki:

 https://wiki.apache.org/commons/UsingGIT

 ...

 Oh, it already is there at the end


>>> Indeed, there is information there.
>>> That works:
>>>   $ git fetch github pull/72/head:fix-foo-in-bar
>>>
>>> But is it simpler to
>>>  1. remember the syntax
>>>  2. go to the GitHub site (following the link "manually" posted by
>>> the contributor on the JIRA page)
>>>  3. figure out what part of the GitHub page contains the string
>>> for replacing "fix-foo-in-bar"
>>>  4. copy/paste it in a console
>>>  5. run the above command
>>>  6. merge the branch created by the above command
>>> than have the full command posted automatically on the JIRA page,
>>> so that the committer can do everything in one go?
>>>
>>> Note that the command above is not the same as the syntax provided
>>> in the automatic posts ("fetch" vs "pull").
>>>
>>> Question is still: Why different behaviours of the GitHub mirrors?
>>> Do we want this fixed?
>>> How?
>>>
>>>
>>> Thanks,
>>> Gilles
>>>
>>>
>>>
>>> On 2 March 2017 at 10:50, Gilles  wrote:
>>>

 On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:
>
>
>> Normally the GitHub email gives you the proper command to use to pull
>> the
>> PR into your local git which you can merge and push (which merges the
>> PR
>> once GitHub gets updated from apache.org).
>>
>> As for making sure that email gets sent, if it's not, file an INFRA
>> ticket
>> about it. I've never tried it, but this might work:
>>
>> git pull https://github.com/apache/commons-math/pull/55
>>
>>
>
> $ git pull https://github.com/apache/commons-math/pull/55
> remote: Not Found
> fatal: repository 'https://github.com/apache/commons-math/pull/55/'
> not
> found
>
> If you add .diff or .patch to the end of the URL, it gives you a diff
>
>> that
>> you can manually apply. The .diff URL appears to be a normal diff
>> while
>> the
>> .patch URL is the output of "git format-patch". So, if you download <
>> https://github.com/apache/commons-math/pull/55.patch> and run "git
>> apply
>> 55.patch", that'll commit it properly as if you merged the PR itself I
>> think (it'll set the commit author properly at least for proper
>> historical
>> attribution).
>>
>>
>
> Thanks, that could be a (sub-optimal) solution.
>
> Also, adding a commit message somewhere (e.g., a follow up empty commit
>
>> or
>> a changelog entry commit) containing the phrase "this closes #55" (or
>> maybe
>> just "closes #55"; it's pretty loose) is enough to close the PR, but
>> merging it should close it automatically.
>>
>>
>
> Yes, I knew that, because the notification, when it gets sent, contains
> all the information necessary to handle to request (and additionally,
> the
> JIRA issue will be updated automatically too).
>
> Hence that would be the preferred solution.
>
> I still wonder why the various Commons projects (those managed by git
> and
> having a GitHub mirror) behave differently.
>
>
> Regards,
> Gilles
>
>
> On 1 March 2017 at 17:53, Gilles  wrote:
>
>>
>> Hi.
>>
>>>
>>> How should the project be configured such that the request
>>> posted here:
>>>   https://issues.apache.org/jira/browse/MATH-1405
>>> is as easy to handle as the one posted here:
>>>   https://issues.apache.org/jira/browse/NUMBERS-4
>>> ?
>>>
>>> Thanks,
>>> Gilles
>>>
>>>
>>
>>>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Matt Sicker 


Re: [ALL][Math] git pull requests: how?

2017-03-02 Thread Gilles

On Thu, 2 Mar 2017 09:35:53 -0600, Matt Sicker wrote:

Is the different behavior caused by svn versus git mirroring?


The "Math" and "Numbers" projects both use git.

Gilles


That read-only branch feature is really cool.
Some of this info might be
useful to include in the template readme files and such for commons.


Since the template is the same for all git projects



On 2 March 2017 at 06:09, Gilles  
wrote:



On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:


This info (when validated) should be added to the Wiki:

https://wiki.apache.org/commons/UsingGIT

...

Oh, it already is there at the end



Indeed, there is information there.
That works:
  $ git fetch github pull/72/head:fix-foo-in-bar

But is it simpler to
 1. remember the syntax
 2. go to the GitHub site (following the link "manually" posted by
the contributor on the JIRA page)
 3. figure out what part of the GitHub page contains the string
for replacing "fix-foo-in-bar"
 4. copy/paste it in a console
 5. run the above command
 6. merge the branch created by the above command
than have the full command posted automatically on the JIRA page,
so that the committer can do everything in one go?

Note that the command above is not the same as the syntax provided
in the automatic posts ("fetch" vs "pull").

Question is still: Why different behaviours of the GitHub mirrors?
Do we want this fixed?
How?


Thanks,
Gilles



On 2 March 2017 at 10:50, Gilles  
wrote:



On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:



Normally the GitHub email gives you the proper command to use to 
pull

the
PR into your local git which you can merge and push (which merges 
the PR

once GitHub gets updated from apache.org).

As for making sure that email gets sent, if it's not, file an 
INFRA

ticket
about it. I've never tried it, but this might work:

git pull https://github.com/apache/commons-math/pull/55




$ git pull https://github.com/apache/commons-math/pull/55
remote: Not Found
fatal: repository 
'https://github.com/apache/commons-math/pull/55/' not

found

If you add .diff or .patch to the end of the URL, it gives you a 
diff

that
you can manually apply. The .diff URL appears to be a normal diff 
while

the
.patch URL is the output of "git format-patch". So, if you 
download <
https://github.com/apache/commons-math/pull/55.patch> and run 
"git

apply
55.patch", that'll commit it properly as if you merged the PR 
itself I

think (it'll set the commit author properly at least for proper
historical
attribution).




Thanks, that could be a (sub-optimal) solution.

Also, adding a commit message somewhere (e.g., a follow up empty 
commit

or
a changelog entry commit) containing the phrase "this closes #55" 
(or

maybe
just "closes #55"; it's pretty loose) is enough to close the PR, 
but

merging it should close it automatically.




Yes, I knew that, because the notification, when it gets sent, 
contains
all the information necessary to handle to request (and 
additionally, the

JIRA issue will be updated automatically too).

Hence that would be the preferred solution.

I still wonder why the various Commons projects (those managed by 
git and

having a GitHub mirror) behave differently.


Regards,
Gilles


On 1 March 2017 at 17:53, Gilles  
wrote:


Hi.


How should the project be configured such that the request
posted here:
  https://issues.apache.org/jira/browse/MATH-1405
is as easy to handle as the one posted here:
  https://issues.apache.org/jira/browse/NUMBERS-4
?

Thanks,
Gilles









-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-02 Thread Matt Sicker
Is the different behavior caused by svn versus git mirroring?

That read-only branch feature is really cool. Some of this info might be
useful to include in the template readme files and such for commons.

On 2 March 2017 at 06:09, Gilles  wrote:

> On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:
>
>> This info (when validated) should be added to the Wiki:
>>
>> https://wiki.apache.org/commons/UsingGIT
>>
>> ...
>>
>> Oh, it already is there at the end
>>
>
> Indeed, there is information there.
> That works:
>   $ git fetch github pull/72/head:fix-foo-in-bar
>
> But is it simpler to
>  1. remember the syntax
>  2. go to the GitHub site (following the link "manually" posted by
> the contributor on the JIRA page)
>  3. figure out what part of the GitHub page contains the string
> for replacing "fix-foo-in-bar"
>  4. copy/paste it in a console
>  5. run the above command
>  6. merge the branch created by the above command
> than have the full command posted automatically on the JIRA page,
> so that the committer can do everything in one go?
>
> Note that the command above is not the same as the syntax provided
> in the automatic posts ("fetch" vs "pull").
>
> Question is still: Why different behaviours of the GitHub mirrors?
> Do we want this fixed?
> How?
>
>
> Thanks,
> Gilles
>
>
>
> On 2 March 2017 at 10:50, Gilles  wrote:
>>
>>> On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:
>>>

 Normally the GitHub email gives you the proper command to use to pull
 the
 PR into your local git which you can merge and push (which merges the PR
 once GitHub gets updated from apache.org).

 As for making sure that email gets sent, if it's not, file an INFRA
 ticket
 about it. I've never tried it, but this might work:

 git pull https://github.com/apache/commons-math/pull/55

>>>
>>>
>>> $ git pull https://github.com/apache/commons-math/pull/55
>>> remote: Not Found
>>> fatal: repository 'https://github.com/apache/commons-math/pull/55/' not
>>> found
>>>
>>> If you add .diff or .patch to the end of the URL, it gives you a diff
 that
 you can manually apply. The .diff URL appears to be a normal diff while
 the
 .patch URL is the output of "git format-patch". So, if you download <
 https://github.com/apache/commons-math/pull/55.patch> and run "git
 apply
 55.patch", that'll commit it properly as if you merged the PR itself I
 think (it'll set the commit author properly at least for proper
 historical
 attribution).

>>>
>>>
>>> Thanks, that could be a (sub-optimal) solution.
>>>
>>> Also, adding a commit message somewhere (e.g., a follow up empty commit
 or
 a changelog entry commit) containing the phrase "this closes #55" (or
 maybe
 just "closes #55"; it's pretty loose) is enough to close the PR, but
 merging it should close it automatically.

>>>
>>>
>>> Yes, I knew that, because the notification, when it gets sent, contains
>>> all the information necessary to handle to request (and additionally, the
>>> JIRA issue will be updated automatically too).
>>>
>>> Hence that would be the preferred solution.
>>>
>>> I still wonder why the various Commons projects (those managed by git and
>>> having a GitHub mirror) behave differently.
>>>
>>>
>>> Regards,
>>> Gilles
>>>
>>>
>>> On 1 March 2017 at 17:53, Gilles  wrote:

 Hi.
>
> How should the project be configured such that the request
> posted here:
>   https://issues.apache.org/jira/browse/MATH-1405
> is as easy to handle as the one posted here:
>   https://issues.apache.org/jira/browse/NUMBERS-4
> ?
>
> Thanks,
> Gilles
>

>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Matt Sicker 


Re: [ALL][Math] git pull requests: how?

2017-03-02 Thread Gilles

On Thu, 2 Mar 2017 11:30:17 +, sebb wrote:

This info (when validated) should be added to the Wiki:

https://wiki.apache.org/commons/UsingGIT

...

Oh, it already is there at the end


Indeed, there is information there.
That works:
  $ git fetch github pull/72/head:fix-foo-in-bar

But is it simpler to
 1. remember the syntax
 2. go to the GitHub site (following the link "manually" posted by
the contributor on the JIRA page)
 3. figure out what part of the GitHub page contains the string
for replacing "fix-foo-in-bar"
 4. copy/paste it in a console
 5. run the above command
 6. merge the branch created by the above command
than have the full command posted automatically on the JIRA page,
so that the committer can do everything in one go?

Note that the command above is not the same as the syntax provided
in the automatic posts ("fetch" vs "pull").

Question is still: Why different behaviours of the GitHub mirrors?
Do we want this fixed?
How?


Thanks,
Gilles


On 2 March 2017 at 10:50, Gilles  
wrote:

On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:


Normally the GitHub email gives you the proper command to use to 
pull the
PR into your local git which you can merge and push (which merges 
the PR

once GitHub gets updated from apache.org).

As for making sure that email gets sent, if it's not, file an INFRA 
ticket

about it. I've never tried it, but this might work:

git pull https://github.com/apache/commons-math/pull/55



$ git pull https://github.com/apache/commons-math/pull/55
remote: Not Found
fatal: repository 'https://github.com/apache/commons-math/pull/55/' 
not

found

If you add .diff or .patch to the end of the URL, it gives you a 
diff that
you can manually apply. The .diff URL appears to be a normal diff 
while

the
.patch URL is the output of "git format-patch". So, if you download 
<
https://github.com/apache/commons-math/pull/55.patch> and run "git 
apply
55.patch", that'll commit it properly as if you merged the PR 
itself I
think (it'll set the commit author properly at least for proper 
historical

attribution).



Thanks, that could be a (sub-optimal) solution.

Also, adding a commit message somewhere (e.g., a follow up empty 
commit or
a changelog entry commit) containing the phrase "this closes #55" 
(or

maybe
just "closes #55"; it's pretty loose) is enough to close the PR, 
but

merging it should close it automatically.



Yes, I knew that, because the notification, when it gets sent, 
contains
all the information necessary to handle to request (and 
additionally, the

JIRA issue will be updated automatically too).

Hence that would be the preferred solution.

I still wonder why the various Commons projects (those managed by 
git and

having a GitHub mirror) behave differently.


Regards,
Gilles


On 1 March 2017 at 17:53, Gilles  
wrote:



Hi.

How should the project be configured such that the request
posted here:
  https://issues.apache.org/jira/browse/MATH-1405
is as easy to handle as the one posted here:
  https://issues.apache.org/jira/browse/NUMBERS-4
?

Thanks,
Gilles



-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-02 Thread sebb
This info (when validated) should be added to the Wiki:

https://wiki.apache.org/commons/UsingGIT

...

Oh, it already is there at the end


On 2 March 2017 at 10:50, Gilles  wrote:
> On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:
>>
>> Normally the GitHub email gives you the proper command to use to pull the
>> PR into your local git which you can merge and push (which merges the PR
>> once GitHub gets updated from apache.org).
>>
>> As for making sure that email gets sent, if it's not, file an INFRA ticket
>> about it. I've never tried it, but this might work:
>>
>> git pull https://github.com/apache/commons-math/pull/55
>
>
> $ git pull https://github.com/apache/commons-math/pull/55
> remote: Not Found
> fatal: repository 'https://github.com/apache/commons-math/pull/55/' not
> found
>
>> If you add .diff or .patch to the end of the URL, it gives you a diff that
>> you can manually apply. The .diff URL appears to be a normal diff while
>> the
>> .patch URL is the output of "git format-patch". So, if you download <
>> https://github.com/apache/commons-math/pull/55.patch> and run "git apply
>> 55.patch", that'll commit it properly as if you merged the PR itself I
>> think (it'll set the commit author properly at least for proper historical
>> attribution).
>
>
> Thanks, that could be a (sub-optimal) solution.
>
>> Also, adding a commit message somewhere (e.g., a follow up empty commit or
>> a changelog entry commit) containing the phrase "this closes #55" (or
>> maybe
>> just "closes #55"; it's pretty loose) is enough to close the PR, but
>> merging it should close it automatically.
>
>
> Yes, I knew that, because the notification, when it gets sent, contains
> all the information necessary to handle to request (and additionally, the
> JIRA issue will be updated automatically too).
>
> Hence that would be the preferred solution.
>
> I still wonder why the various Commons projects (those managed by git and
> having a GitHub mirror) behave differently.
>
>
> Regards,
> Gilles
>
>
>> On 1 March 2017 at 17:53, Gilles  wrote:
>>
>>> Hi.
>>>
>>> How should the project be configured such that the request
>>> posted here:
>>>   https://issues.apache.org/jira/browse/MATH-1405
>>> is as easy to handle as the one posted here:
>>>   https://issues.apache.org/jira/browse/NUMBERS-4
>>> ?
>>>
>>> Thanks,
>>> Gilles
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>>> For additional commands, e-mail: dev-h...@commons.apache.org
>>>
>>>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-02 Thread Gilles

On Wed, 1 Mar 2017 22:51:54 -0600, Matt Sicker wrote:
Normally the GitHub email gives you the proper command to use to pull 
the
PR into your local git which you can merge and push (which merges the 
PR

once GitHub gets updated from apache.org).

As for making sure that email gets sent, if it's not, file an INFRA 
ticket

about it. I've never tried it, but this might work:

git pull https://github.com/apache/commons-math/pull/55


$ git pull https://github.com/apache/commons-math/pull/55
remote: Not Found
fatal: repository 'https://github.com/apache/commons-math/pull/55/' not 
found


If you add .diff or .patch to the end of the URL, it gives you a diff 
that
you can manually apply. The .diff URL appears to be a normal diff 
while the

.patch URL is the output of "git format-patch". So, if you download <
https://github.com/apache/commons-math/pull/55.patch> and run "git 
apply
55.patch", that'll commit it properly as if you merged the PR itself 
I
think (it'll set the commit author properly at least for proper 
historical

attribution).


Thanks, that could be a (sub-optimal) solution.

Also, adding a commit message somewhere (e.g., a follow up empty 
commit or
a changelog entry commit) containing the phrase "this closes #55" (or 
maybe

just "closes #55"; it's pretty loose) is enough to close the PR, but
merging it should close it automatically.


Yes, I knew that, because the notification, when it gets sent, contains
all the information necessary to handle to request (and additionally, 
the

JIRA issue will be updated automatically too).

Hence that would be the preferred solution.

I still wonder why the various Commons projects (those managed by git 
and

having a GitHub mirror) behave differently.


Regards,
Gilles

On 1 March 2017 at 17:53, Gilles  
wrote:



Hi.

How should the project be configured such that the request
posted here:
  https://issues.apache.org/jira/browse/MATH-1405
is as easy to handle as the one posted here:
  https://issues.apache.org/jira/browse/NUMBERS-4
?

Thanks,
Gilles



-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org





-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL][Math] git pull requests: how?

2017-03-01 Thread Matt Sicker
Normally the GitHub email gives you the proper command to use to pull the
PR into your local git which you can merge and push (which merges the PR
once GitHub gets updated from apache.org).

As for making sure that email gets sent, if it's not, file an INFRA ticket
about it. I've never tried it, but this might work:

git pull https://github.com/apache/commons-math/pull/55

If you add .diff or .patch to the end of the URL, it gives you a diff that
you can manually apply. The .diff URL appears to be a normal diff while the
.patch URL is the output of "git format-patch". So, if you download <
https://github.com/apache/commons-math/pull/55.patch> and run "git apply
55.patch", that'll commit it properly as if you merged the PR itself I
think (it'll set the commit author properly at least for proper historical
attribution).

Also, adding a commit message somewhere (e.g., a follow up empty commit or
a changelog entry commit) containing the phrase "this closes #55" (or maybe
just "closes #55"; it's pretty loose) is enough to close the PR, but
merging it should close it automatically.

On 1 March 2017 at 17:53, Gilles  wrote:

> Hi.
>
> How should the project be configured such that the request
> posted here:
>   https://issues.apache.org/jira/browse/MATH-1405
> is as easy to handle as the one posted here:
>   https://issues.apache.org/jira/browse/NUMBERS-4
> ?
>
> Thanks,
> Gilles
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Matt Sicker 


[ALL][Math] git pull requests: how?

2017-03-01 Thread Gilles

Hi.

How should the project be configured such that the request
posted here:
  https://issues.apache.org/jira/browse/MATH-1405
is as easy to handle as the one posted here:
  https://issues.apache.org/jira/browse/NUMBERS-4
?

Thanks,
Gilles


-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org