Updating submodules

2015-01-06 Thread Simon Peyton Jones
Herbert, or anyone,

I'm very confused about the workflow for updating submodules.   I want to 
update several (to remove redundant constraints from contexts) which are 
maintained by GHC HQ.  But for libraries/parallel I find:


* There is no .git/config in libraries/parallel.  (Whereas there is for 
another submodule, libraries/hoopl.)

* There is, however, a .git file which points to 
.git/modules/libraries/parallel

* In .git/modules/libraries/parallel/config, I see a url of 
https://git.haskell.org/packages/parallel.git.  But I can't push to this URL.

* That matches the url in 
https://ghc.haskell.org/trac/ghc/wiki/Repositories, but contradicts the url in 
'packages', which says ssh://g...@github.com/haskell/parallel.git

*  I don't understand what URL should be expected for submodules with 
- in the 'upstream url' column of the 'packages' file.   It says - means 
'this is a submodule', but parallel is certainly a submodule and doesn't have 
-.  But so is hoopl, which does have -.
I tried a minimal change of adding
   pushurl = ssh://g...@git.haskell.org/packages/hoopl.git
to .git/modules/libraries/parallel/config.  But when I tried to push I got
simonpj@cam-05-unx:~/code/HEAD-2/libraries/parallel$ git push
Counting objects: 7, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 410 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: W refs/heads/master packages/parallel simonpj DENIED by refs/.*
remote: error: hook declined to update refs/heads/master
To ssh://g...@git.haskell.org/packages/parallel.git
! [remote rejected] HEAD - master (hook declined)
error: failed to push some refs to 
'ssh://g...@git.haskell.org/packages/parallel.git'

So I'm thoroughly stuck. I can't push my main patch until I push the submodule 
patches.  What do I do?
And would it be possible to update the wiki pages to make this clear?  
Especially

* https://ghc.haskell.org/trac/ghc/wiki/Repositories

* 
https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules

Thanks
Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Updating submodules

2015-01-06 Thread Herbert Valerio Riedel
Hello Simon,

On 2015-01-06 at 10:59:44 +0100, Simon Peyton Jones wrote:
 I'm very confused about the workflow for updating submodules.  I want
 to update several (to remove redundant constraints from contexts)
 which are maintained by GHC HQ.  But for libraries/parallel I find:



 * There is no .git/config in libraries/parallel.  (Whereas
 there is for another submodule, libraries/hoopl.)

 * There is, however, a .git file which points to 
 .git/modules/libraries/parallel

That's most likely because libraries/hoopl wasn't created via `git
submodule` but rather inherited from a Git checkout where
libraries/hoopl was an decoupled (not yet submodule) sub-repo...

In any case, if you manage Git remotes (while in libraries/hoopl) via
the `git remote` command, Git takes care of following the symlinked
.git folder...

 * In .git/modules/libraries/parallel/config, I see a url of
 https://git.haskell.org/packages/parallel.git.  But I can't push to
 this URL.

yes, that's our mirrored copy of github.com/haskell/parallel/

 * That matches the url in
 https://ghc.haskell.org/trac/ghc/wiki/Repositories, but contradicts
 the url in 'packages', which says

 ssh://g...@github.com/haskell/parallel.git

yes, that's exactly the upstream URL you're supposed to push to...  (and
since it's a ssh:// protocl url, it means you should have push-rights
there)

 * I don't understand what URL should be expected for submodules with
 - in the 'upstream url' column of the 'packages' file.  It says -
 means 'this is a submodule', but parallel is certainly a submodule and
 doesn't have -.  

The comment there is probably a bit misleading;

- in the upstreamurl field just means that the official upstream
repo is at git.haskell.org, and you should use the usual
ssh://git.haskell.org/... URL for pushing...

 But so is hoopl, which does have -.
 I tried a minimal change of adding
pushurl = ssh://g...@git.haskell.org/packages/hoopl.git

are you confusing 'hoopl' with 'parallel' here?

hoopl's upstream is in fact at git.haskell.org, but parallel lives at
github.com/haskell/parallel ...

 to .git/modules/libraries/parallel/config.  But when I tried to push I got
 simonpj@cam-05-unx:~/code/HEAD-2/libraries/parallel$ git push
 Counting objects: 7, done.
 Delta compression using up to 32 threads.
 Compressing objects: 100% (4/4), done.
 Writing objects: 100% (4/4), 410 bytes, done.
 Total 4 (delta 3), reused 0 (delta 0)
 remote: W refs/heads/master packages/parallel simonpj DENIED by refs/.*
 remote: error: hook declined to update refs/heads/master
 To ssh://g...@git.haskell.org/packages/parallel.git
 ! [remote rejected] HEAD - master (hook declined)
 error: failed to push some refs to 
 'ssh://g...@git.haskell.org/packages/parallel.git'

 So I'm thoroughly stuck. I can't push my main patch until I push the 
 submodule patches.  What do I do?
 And would it be possible to update the wiki pages to make this clear?  
 Especially

 * https://ghc.haskell.org/trac/ghc/wiki/Repositories

 * 
 https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules

 Thanks
 Simon
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs

-- 
Elegance is not optional -- Richard O'Keefe
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: Updating submodules

2015-01-06 Thread Simon Peyton Jones
|   * There is no .git/config in libraries/parallel.  (Whereas
|   there is for another submodule, libraries/hoopl.)
|  
|   * There is, however, a .git file which points to
|  .git/modules/libraries/parallel
|  
|  That's most likely because libraries/hoopl wasn't created via `git
|  submodule` but rather inherited from a Git checkout where
|  libraries/hoopl was an decoupled (not yet submodule) sub-repo...

Yes, that's plausible.  So the hoopl one is wrong, and the parallel one is 
right. But how do I fix hoopl?  (Short of blowing away the whole repository, 
which I can't do because it has lots of commits in it.)

|  In any case, if you manage Git remotes (while in libraries/hoopl) via
|  the `git remote` command, Git takes care of following the symlinked
|  .git folder...

OK.  But in this case what do I do?

|   * In .git/modules/libraries/parallel/config, I see a url of
|   https://git.haskell.org/packages/parallel.git.  But I can't push to
|   this URL.
|  
|  yes, that's our mirrored copy of github.com/haskell/parallel/
|  
|   * That matches the url in
|   https://ghc.haskell.org/trac/ghc/wiki/Repositories, but contradicts
|   the url in 'packages', which says
|  
|   ssh://g...@github.com/haskell/parallel.git
|  
|  yes, that's exactly the upstream URL you're supposed to push to...
|  (and since it's a ssh:// protocl url, it means you should have push-
|  rights there)

So 

* I *push* to ssh://g...@github.com/haskell/parallel.git
* I *pull* from https://git.haskell.org/packages/parallel.git

Is that right?  Then again, how can I get the right URLs in the right place?


|  The comment there is probably a bit misleading;
|  
|  - in the upstreamurl field just means that the official upstream
|  repo is at git.haskell.org, and you should use the usual
|  ssh://git.haskell.org/... URL for pushing...

OK, so they are *ALL* sub-modules, and - is just shorthand for a particular 
URL.  Would it be possible to fix the comment?

Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: Updating submodules

2015-01-06 Thread Simon Peyton Jones
Following a chat with Herbert, I've updated
https://ghc.haskell.org/trac/ghc/wiki/Repositories

Please check/proof-read

Simon

|  -Original Message-
|  From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of
|  Simon Peyton Jones
|  Sent: 06 January 2015 10:49
|  To: Herbert Valerio Riedel
|  Cc: ghc-devs@haskell.org
|  Subject: RE: Updating submodules
|  
|  |   * There is no .git/config in libraries/parallel.
|  (Whereas
|  |   there is for another submodule, libraries/hoopl.)
|  |
|  |   * There is, however, a .git file which points to
|  |  .git/modules/libraries/parallel
|  |
|  |  That's most likely because libraries/hoopl wasn't created via `git
|  | submodule` but rather inherited from a Git checkout where
|  | libraries/hoopl was an decoupled (not yet submodule) sub-repo...
|  
|  Yes, that's plausible.  So the hoopl one is wrong, and the parallel
|  one is right. But how do I fix hoopl?  (Short of blowing away the
|  whole repository, which I can't do because it has lots of commits in
|  it.)
|  
|  |  In any case, if you manage Git remotes (while in libraries/hoopl)
|  via
|  | the `git remote` command, Git takes care of following the
|  symlinked
|  |  .git folder...
|  
|  OK.  But in this case what do I do?
|  
|  |   * In .git/modules/libraries/parallel/config, I see a url of  
|  | https://git.haskell.org/packages/parallel.git.  But I can't push to
|  
|  | this URL.
|  |
|  |  yes, that's our mirrored copy of github.com/haskell/parallel/
|  |
|  |   * That matches the url in
|  |   https://ghc.haskell.org/trac/ghc/wiki/Repositories, but
|  contradicts
|  |  the url in 'packages', which says
|  |
|  |   ssh://g...@github.com/haskell/parallel.git
|  |
|  |  yes, that's exactly the upstream URL you're supposed to push to...
|  |  (and since it's a ssh:// protocl url, it means you should have
|  push-
|  | rights there)
|  
|  So
|  
|  * I *push* to ssh://g...@github.com/haskell/parallel.git
|  * I *pull* from https://git.haskell.org/packages/parallel.git
|  
|  Is that right?  Then again, how can I get the right URLs in the right
|  place?
|  
|  
|  |  The comment there is probably a bit misleading;
|  |
|  |  - in the upstreamurl field just means that the official
|  upstream
|  | repo is at git.haskell.org, and you should use the usual
|  | ssh://git.haskell.org/... URL for pushing...
|  
|  OK, so they are *ALL* sub-modules, and - is just shorthand for a
|  particular URL.  Would it be possible to fix the comment?
|  
|  Simon
|  ___
|  ghc-devs mailing list
|  ghc-devs@haskell.org
|  http://www.haskell.org/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: Updating submodules

2015-01-06 Thread Simon Peyton Jones
Now everything is clear. I wish someone had pointed me at this site earlier.  
No longer do I need to pore through endless Learn You a Git for Great Happiness 
tutorials.  I can just generate a new man page whenever I feel like it.  
Perfect.

Simon

From: Ryan Newton [mailto:rrnew...@gmail.com]
Sent: 06 January 2015 16:28
To: Simon Peyton Jones; Herbert Valerio Riedel
Cc: ghc-devs@haskell.org
Subject: Re: Updating submodules

Has everyone seen the git man page generator ;-)?  Hilarious.

http://git-man-page-generator.lokaltog.net/

On Tue Jan 06 2015 at 7:49:30 AM Simon Peyton Jones 
simo...@microsoft.commailto:simo...@microsoft.com wrote:
Following a chat with Herbert, I've updated
https://ghc.haskell.org/trac/ghc/wiki/Repositories

Please check/proof-read

Simon

|  -Original Message-
|  From: ghc-devs 
[mailto:ghc-devs-boun...@haskell.orgmailto:ghc-devs-boun...@haskell.org] On 
Behalf Of
|  Simon Peyton Jones
|  Sent: 06 January 2015 10:49
|  To: Herbert Valerio Riedel
|  Cc: ghc-devs@haskell.orgmailto:ghc-devs@haskell.org
|  Subject: RE: Updating submodules
|
|  |   * There is no .git/config in libraries/parallel.
|  (Whereas
|  |   there is for another submodule, libraries/hoopl.)
|  |
|  |   * There is, however, a .git file which points to
|  |  .git/modules/libraries/parallel
|  |
|  |  That's most likely because libraries/hoopl wasn't created via `git
|  | submodule` but rather inherited from a Git checkout where
|  | libraries/hoopl was an decoupled (not yet submodule) sub-repo...
|
|  Yes, that's plausible.  So the hoopl one is wrong, and the parallel
|  one is right. But how do I fix hoopl?  (Short of blowing away the
|  whole repository, which I can't do because it has lots of commits in
|  it.)
|
|  |  In any case, if you manage Git remotes (while in libraries/hoopl)
|  via
|  | the `git remote` command, Git takes care of following the
|  symlinked
|  |  .git folder...
|
|  OK.  But in this case what do I do?
|
|  |   * In .git/modules/libraries/parallel/config, I see a url of  
|  | https://git.haskell.org/packages/parallel.git.  But I can't push to
|  
|  | this URL.
|  |
|  |  yes, that's our mirrored copy of 
github.com/haskell/parallel/http://github.com/haskell/parallel/
|  |
|  |   * That matches the url in
|  |   https://ghc.haskell.org/trac/ghc/wiki/Repositories, but
|  contradicts
|  |  the url in 'packages', which says
|  |
|  |   
ssh://g...@github.com/haskell/parallel.githttp://g...@github.com/haskell/parallel.git
|  |
|  |  yes, that's exactly the upstream URL you're supposed to push to...
|  |  (and since it's a ssh:// protocl url, it means you should have
|  push-
|  | rights there)
|
|  So
|
|  * I *push* to 
ssh://g...@github.com/haskell/parallel.githttp://g...@github.com/haskell/parallel.git
|  * I *pull* from https://git.haskell.org/packages/parallel.git
|
|  Is that right?  Then again, how can I get the right URLs in the right
|  place?
|
|
|  |  The comment there is probably a bit misleading;
|  |
|  |  - in the upstreamurl field just means that the official
|  upstream
|  | repo is at git.haskell.orghttp://git.haskell.org, and you should use the 
usual
|  | ssh://git.haskell.org/.http://git.haskell.org/.. URL for pushing...
|
|  OK, so they are *ALL* sub-modules, and - is just shorthand for a
|  particular URL.  Would it be possible to fix the comment?
|
|  Simon
|  ___
|  ghc-devs mailing list
|  ghc-devs@haskell.orgmailto:ghc-devs@haskell.org
|  http://www.haskell.org/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.orgmailto:ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Updating submodules

2015-01-06 Thread Brandon Allbery
On Tue, Jan 6, 2015 at 11:28 AM, Ryan Newton rrnew...@gmail.com wrote:

 Has everyone seen the git man page generator ;-)?  Hilarious.
 http://git-man-page-generator.lokaltog.net/


I still want the git version of http://thedoomthatcametopuppet.tumblr.com/
:p

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Updating submodules

2015-01-06 Thread Ryan Newton
Has everyone seen the git man page generator ;-)?  Hilarious.

http://git-man-page-generator.lokaltog.net/


On Tue Jan 06 2015 at 7:49:30 AM Simon Peyton Jones simo...@microsoft.com
wrote:

 Following a chat with Herbert, I've updated
 https://ghc.haskell.org/trac/ghc/wiki/Repositories

 Please check/proof-read

 Simon

 |  -Original Message-
 |  From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of
 |  Simon Peyton Jones
 |  Sent: 06 January 2015 10:49
 |  To: Herbert Valerio Riedel
 |  Cc: ghc-devs@haskell.org
 |  Subject: RE: Updating submodules
 |
 |  |   * There is no .git/config in libraries/parallel.
 |  (Whereas
 |  |   there is for another submodule, libraries/hoopl.)
 |  |
 |  |   * There is, however, a .git file which points to
 |  |  .git/modules/libraries/parallel
 |  |
 |  |  That's most likely because libraries/hoopl wasn't created via `git
 |  | submodule` but rather inherited from a Git checkout where
 |  | libraries/hoopl was an decoupled (not yet submodule) sub-repo...
 |
 |  Yes, that's plausible.  So the hoopl one is wrong, and the parallel
 |  one is right. But how do I fix hoopl?  (Short of blowing away the
 |  whole repository, which I can't do because it has lots of commits in
 |  it.)
 |
 |  |  In any case, if you manage Git remotes (while in libraries/hoopl)
 |  via
 |  | the `git remote` command, Git takes care of following the
 |  symlinked
 |  |  .git folder...
 |
 |  OK.  But in this case what do I do?
 |
 |  |   * In .git/modules/libraries/parallel/config, I see a url of  
 |  | https://git.haskell.org/packages/parallel.git.  But I can't push to
 |  
 |  | this URL.
 |  |
 |  |  yes, that's our mirrored copy of github.com/haskell/parallel/
 |  |
 |  |   * That matches the url in
 |  |   https://ghc.haskell.org/trac/ghc/wiki/Repositories, but
 |  contradicts
 |  |  the url in 'packages', which says
 |  |
 |  |   ssh://g...@github.com/haskell/parallel.git
 |  |
 |  |  yes, that's exactly the upstream URL you're supposed to push to...
 |  |  (and since it's a ssh:// protocl url, it means you should have
 |  push-
 |  | rights there)
 |
 |  So
 |
 |  * I *push* to ssh://g...@github.com/haskell/parallel.git
 |  * I *pull* from https://git.haskell.org/packages/parallel.git
 |
 |  Is that right?  Then again, how can I get the right URLs in the right
 |  place?
 |
 |
 |  |  The comment there is probably a bit misleading;
 |  |
 |  |  - in the upstreamurl field just means that the official
 |  upstream
 |  | repo is at git.haskell.org, and you should use the usual
 |  | ssh://git.haskell.org/... URL for pushing...
 |
 |  OK, so they are *ALL* sub-modules, and - is just shorthand for a
 |  particular URL.  Would it be possible to fix the comment?
 |
 |  Simon
 |  ___
 |  ghc-devs mailing list
 |  ghc-devs@haskell.org
 |  http://www.haskell.org/mailman/listinfo/ghc-devs
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs