Re: [Potlatch-dev] Git starter?
Steve Bennett wrote: > Ok, so Richard runs the debug repository, Tom runs the production > repository. I think strictly speaking it's more that I run the "P2 project" repository, Tom runs the "OSM instance of P2" repository. For whatever it's worth. cheers Richard -- View this message in context: http://gis.638310.n2.nabble.com/Potlatch-dev-Git-starter-tp6741077p6758654.html Sent from the Potlatch mailing list archive at Nabble.com. ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On Thu, Sep 1, 2011 at 2:34 AM, Andy Allan wrote: > A few other things spring instantly to mind - an ill-advised redesign > of the Undo system, a few problems with the Magic Roundabout system > (e.g. having a 50% chance of nuking a way when trying to shorten it) > and, more than anything else, lots of cases of commits generating > compiler warnings. That these commits were to trunk kept necessitating > other developers stepping up and fixing the build before they could > continue with their own work. That was getting quite disruptive. I see - thanks for elaborating. I hadn't realised that those issues were so problematic. I guess one advantage of "commit first, discuss later" is that some of these issues (eg, the undo system) get forced into the limelight. There's clearly a balance, though, so I look forward to seeing how it works out this way in practice. > I'd written that before the situation was clear. But there's also the > distinction that it's not necessarily what OSMF is deploying, and I > try to discourage anyone from getting worried about which repo to > clone from. If you clone from mine, and then want to pull changes from > someone else, it all comes out the same. Any notion of One True Repo > just causes more confusion later on! I guess it's the difference between "there is one true repo (and also other true repos)" and "there is no one true repo". Again, thanks for the explanation. > Make sure you realise that there's nothing that makes it the > definitive repository other than social factors. Unlike svn there's no > central repository. It's only "definitive" in that Richard is the > current maintainer, and the only difference he has over the rest of us > is that TomH generally doesn't disagree with him (on p2 matters at > least!). But you could also view the OSMF repo as "definitive" if you > care about the version that's actually deployed on osm.org Ok, so Richard runs the debug repository, Tom runs the production repository. Anyway, I have now got a working build again. I think the gotcha that hit me last time was that you can't do this: 1) Clone from the OSM repository to your computer 2) Make changes 3) Publish to Github You have to do this: 1) Clone from OSM repository to your Github account 2) Clone from your Github account to your computer 3) Make changes 4) Publish to Github, and optionally send pull request (git push/git push origin) There's probably some way of recovering if you go down the wrong path (rebasing maybe), but it was beyond me. Anyway, I'm all good now. Steve ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On Wed, Aug 31, 2011 at 4:13 PM, Steve Bennett wrote: >>Yes, but this was causing lots of issues, as I'm sure you remember. > > Actually not - apart from my commiting changes in insufficient > granularity. Happy to take your word for it, though. A few other things spring instantly to mind - an ill-advised redesign of the Undo system, a few problems with the Magic Roundabout system (e.g. having a 50% chance of nuking a way when trying to shorten it) and, more than anything else, lots of cases of commits generating compiler warnings. That these commits were to trunk kept necessitating other developers stepping up and fixing the build before they could continue with their own work. That was getting quite disruptive. > You're probably aware of the long-running debates about pre-commit > review versus post-commit review. Quick summary: pre-commit review > reduces developer activity level but improves quality. I don't know much about the different approaches from a theoretical viewpoint, except that the way were were doing it before caused us lots of issues, and was making refactoring nigh on impossible. >>As Richard has said, his "master" branch is the canonical 'this is >>Potlatch2', so he's in charge > > Cool. This is the definitive statement lacking from the wiki page, > which confused me. I'd written that before the situation was clear. But there's also the distinction that it's not necessarily what OSMF is deploying, and I try to discourage anyone from getting worried about which repo to clone from. If you clone from mine, and then want to pull changes from someone else, it all comes out the same. Any notion of One True Repo just causes more confusion later on! > 1) There is still a definitive repository Make sure you realise that there's nothing that makes it the definitive repository other than social factors. Unlike svn there's no central repository. It's only "definitive" in that Richard is the current maintainer, and the only difference he has over the rest of us is that TomH generally doesn't disagree with him (on p2 matters at least!). But you could also view the OSMF repo as "definitive" if you care about the version that's actually deployed on osm.org There are circumstances (we've done it two or three times already that I can recall) where TomH pulls in bugfixes from my repo straight into the OSMF one and deploys that, when RichardF wasn't around to update his own repository. That's fine, git is totally decentralised like that so it works. Cheers, Andy ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
Ok, I'm just going to rebut everything because I'm in that sort of mood. >P2 has a strong sense of design >and authorship, as do JOSM and osm.org itself. We don't accept any and >every patch - that way would lie chaos. It would be good if the mechanism by which this happens were a little more transparent. Also, if there was more feedback when patches don't get make the cut. I'd love to know what happened to my 'magic roundabout' patch, for instance. >you can send a pull >request to my github account which says "hey! look! here's some code! why >not take a look?". Pull request - cool. That would be a useful tip for the git wiki page. > I see this and either think "yeah, that looks good", >which means I simply press a button and merge it in; or "hmmm, that needs >some more work", in which case I make a branch and work on it from there. I think I'm what I'm reacting to is the sense that my code has to wait "outside the tent", whereas in other environments I'm more used to (Wikipedia, and OSM editing itself), the change is "inside" to begin with, but can be rolled back. >So basically you're complaining that your edits now have to be reviewed before >they are >merged and you can't ram them down people's throats anymore? What a spectacularly poorly worded comment. Moving on. >Well, they are honest. I'd rather not mislead anyone by saying "You >must sign up for github" or "you must clone from this repository" or >anything like that. I'd write it as "Here's the easiest way: xxx (There are alternatives, see yyy)". >Yes, but this was causing lots of issues, as I'm sure you remember. Actually not - apart from my commiting changes in insufficient granularity. Happy to take your word for it, though. >I can (and frequently have) published >half-working, half-finished things on a branch and asked others to >take a look, or made a few commits on one topic before changing to >another I guess the "taking a look" is easier with Git - pulling in changes then reversing them again. >is more than made up for by the ability to >properly review things before they hit master. You're probably aware of the long-running debates about pre-commit review versus post-commit review. Quick summary: pre-commit review reduces developer activity level but improves quality. >As Richard has said, his "master" branch is the canonical 'this is >Potlatch2', so he's in charge Cool. This is the definitive statement lacking from the wiki page, which confused me. >1. You work in your sandbox, and when your work is ready, you show it off. Yeah. Well, I already did that, but I agree that having local source code version control will be beneficial. >There may be changes you make that either aren't applicable to all of >PL2 (or whatever project) or else are changes you don't want to share. Likewise, I already had such changes, and generally didn't find it too hard to avoid committing them. (But again local source code control is no doubt better.) >Sooner or later, your repo will be the canonical repo. Ok, that's not going to happen. (Only rebutting this point in order to be thorough. I don't think it matters.) >I hope this explanation >by Andy, with followup by me, explains why this is absolutely a great >direction for the project. Yes, thanks - it does make more sense now. The key things I was missing: 1) There is still a definitive repository 2) pull requests Steve On Wed, Aug 31, 2011 at 11:13 PM, Serge Wroclawski wrote: > On Wed, Aug 31, 2011 at 8:28 AM, Andy Allan wrote: > >> Yes, but this was causing lots of issues, as I'm sure you remember. >> Think of it instead as being a much more relaxing way of developing - >> you can make your changes public without needing to worry about >> stepping on anyone's toes - I can (and frequently have) published >> half-working, half-finished things on a branch and asked others to >> take a look, or made a few commits on one topic before changing to >> another. Previously I'd need to make sure it was completely finished >> and polished or open the can of worms that was svn branching. > > +1 > > The advantages are several fold. > > 1. You work in your sandbox, and when your work is ready, you show it off. > > As Andy says, this is liberating. If a new feature takes a week, or a > month, no problem. I have my private branches. I can show them to some > people, not show them to others, etc. And when it's ready, I can make > a pull request back to the project maintainer, saying "Okay, this is > now ready to be put back to the canonical branch. > > No worrying about permissions or access, or asking "May I please have > commit rights?" or not being able to save until the patch is > absolutely positively ready. As Andy says, it's more relaxed, and more > collaborative. > > 2. Private changes > > There may be changes you make that either aren't applicable to all of > PL2 (or whatever project) or else are changes you don't want to share. > > I have one of these; a stylesheet for a PL2 instance
Re: [Potlatch-dev] Git starter?
On Wed, Aug 31, 2011 at 8:28 AM, Andy Allan wrote: > Yes, but this was causing lots of issues, as I'm sure you remember. > Think of it instead as being a much more relaxing way of developing - > you can make your changes public without needing to worry about > stepping on anyone's toes - I can (and frequently have) published > half-working, half-finished things on a branch and asked others to > take a look, or made a few commits on one topic before changing to > another. Previously I'd need to make sure it was completely finished > and polished or open the can of worms that was svn branching. +1 The advantages are several fold. 1. You work in your sandbox, and when your work is ready, you show it off. As Andy says, this is liberating. If a new feature takes a week, or a month, no problem. I have my private branches. I can show them to some people, not show them to others, etc. And when it's ready, I can make a pull request back to the project maintainer, saying "Okay, this is now ready to be put back to the canonical branch. No worrying about permissions or access, or asking "May I please have commit rights?" or not being able to save until the patch is absolutely positively ready. As Andy says, it's more relaxed, and more collaborative. 2. Private changes There may be changes you make that either aren't applicable to all of PL2 (or whatever project) or else are changes you don't want to share. I have one of these; a stylesheet for a PL2 instance that would not be appopriate for PL2 general use. I maintain my own repo, my own branches, And in that way, I keep up to date without needing to be in lock-step with Andy and Richard. 3. The canonical repo can change Let's say that the PL2 team contracts brain slugs which make them slow and unresponsive. PL2 languishes as a result, with no bug fixes and no new features. But during this time, your branch is up to date, has bug fixes and accepts new features. Sooner or later, your repo will be the canonical repo. A less extreme example might be that Andy wants to see a feature "in action" before accepting it. Maybe you're on the bleeding edge and he's a bit cautious. I feel like we've been here before with Git. I hope this explanation by Andy, with followup by me, explains why this is absolutely a great direction for the project. - Serge ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On Wed, Aug 31, 2011 at 10:46 AM, Steve Bennett wrote: > On Wed, Aug 31, 2011 at 5:01 AM, Andy Allan wrote: >>If there's any gotchas let me know. > Ok, since you asked: > > "First you need to get a copy of the potlatch2 repository from > somewhere. It doesn't really matter where it comes from..." > ... > "There's many different ways to share your changes with the rest of > the world..." > > These are not good words to reassure the newcomer that these > instructions are simple will take him where he wants to go :) Well, they are honest. I'd rather not mislead anyone by saying "You must sign up for github" or "you must clone from this repository" or anything like that. Note that the first example has an explicit repo to clone from in any case, so that shouldn't hinder anyone. > I find this bit of using git somewhat deflating. With SVN, I was able > to commit my changes into "the" repository. Although the changes > weren't immediately in the production release (fortunately), other > developers would immediately see them next time they did an update. Yes, but this was causing lots of issues, as I'm sure you remember. Think of it instead as being a much more relaxing way of developing - you can make your changes public without needing to worry about stepping on anyone's toes - I can (and frequently have) published half-working, half-finished things on a branch and asked others to take a look, or made a few commits on one topic before changing to another. Previously I'd need to make sure it was completely finished and polished or open the can of worms that was svn branching. The New World Order is a huge improvement, and the small downside of having to make requests (isn't always necessary anyway, since e.g. I follow Richards changes and he follows mine without needing explicit requests every time) is more than made up for by the ability to properly review things before they hit master. > Andy, Richard, or someone (who are the code reviewers, anyway?) > reviews changes, optionally accepts. As Richard has said, his "master" branch is the canonical 'this is Potlatch2', so he's in charge. I'm happy to review code too (especially works in progress) so feel free to shout. Cheers, Andy ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On 31/08/2011 10:46, Steve Bennett wrote: On Wed, Aug 31, 2011 at 5:01 AM, Andy Allan wrote: If there's any gotchas let me know. Ok, since you asked: "First you need to get a copy of the potlatch2 repository from somewhere. It doesn't really matter where it comes from..." ... "There's many different ways to share your changes with the rest of the world..." These are not good words to reassure the newcomer that these instructions are simple will take him where he wants to go :) In case anyone hasn't seen it there's also Ed Loach's "Getting a development copy of Potlatch 2 onto Windows 7 (64-bit) " list on http://wiki.openstreetmap.org/wiki/User:EdLoach . There are probably others around. Cheers, Andy ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On 31/08/11 10:46, Steve Bennett wrote: I find this bit of using git somewhat deflating. With SVN, I was able to commit my changes into "the" repository. Although the changes weren't immediately in the production release (fortunately), other developers would immediately see them next time they did an update. Perhaps it's irrational, but committing to "the" repository is a lot more satisfying than publishing to my own private repository and hoping that someone comes along and takes a look. Before: svn commit After: git commit Email list Andy, Richard, or someone (who are the code reviewers, anyway?) reviews changes, optionally accepts. So basically you're complaining that your edits now have to be reviewed before they are merged and you can't ram them down people's throats anymore? There's no need to hope that somebody comes along and takes a look though - that's why you send pull requests, whether on github or by email. That's you saying "hey, I've got something good here I'd like you to consider for Potlatch" and then your change can be considered for inclusion. Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
Steve Bennett wrote: > I find this bit of using git somewhat deflating. With SVN, I was able > to commit my changes into "the" repository. Although the changes > weren't immediately in the production release (fortunately), other > developers would immediately see them next time they did an update. > Perhaps it's irrational, but committing to "the" repository is a lot > more satisfying than publishing to my own private repository and > hoping that someone comes along and takes a look. > > Before: > svn commit > > After: > git commit > Email list > Andy, Richard, or someone (who are the code reviewers, anyway?) > reviews changes, optionally accepts. The canonical version of P2 is that at github.com/systemed, so the "code reviewer" is principally me. Then, for the osm.org instance of P2, it's Tom's choice whether to deploy it or not. But this is the same as it's always been. But that's as it's always been - git just provides the structure around what we were doing anyway. As you say, "the changes weren't immediately in the production release (fortunately)". :) P2 has a strong sense of design and authorship, as do JOSM and osm.org itself. We don't accept any and every patch - that way would lie chaos. You don't have to do the whole "e-mail list" thing; you can send a pull request to my github account which says "hey! look! here's some code! why not take a look?". I see this and either think "yeah, that looks good", which means I simply press a button and merge it in; or "hmmm, that needs some more work", in which case I make a branch and work on it from there. cheers Richard ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
Re: [Potlatch-dev] Git starter?
On Wed, Aug 31, 2011 at 5:01 AM, Andy Allan wrote: >If there's any gotchas let me know. Ok, since you asked: "First you need to get a copy of the potlatch2 repository from somewhere. It doesn't really matter where it comes from..." ... "There's many different ways to share your changes with the rest of the world..." These are not good words to reassure the newcomer that these instructions are simple will take him where he wants to go :) > The github.com account is optional. When it comes to publishing your > changes then yes, you do need to put them somewhere public, whether > that be on github[1], another server, your own server, or where ever > suits. When you have something published then just let one of us know > where (e.g. by emailing the list) and we can start reviewing and > incorporating your code. I find this bit of using git somewhat deflating. With SVN, I was able to commit my changes into "the" repository. Although the changes weren't immediately in the production release (fortunately), other developers would immediately see them next time they did an update. Perhaps it's irrational, but committing to "the" repository is a lot more satisfying than publishing to my own private repository and hoping that someone comes along and takes a look. Before: svn commit After: git commit Email list Andy, Richard, or someone (who are the code reviewers, anyway?) reviews changes, optionally accepts. > If you need a hand with any of this just give me a shout, I'm more > than happy to help. I guess I'll have to try the github fork/clone thing again and see what goes wrong again. Steve ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev
[Potlatch-dev] Git starter?
Hi all, So I'd like to get back into some potlatch development. Shortly before moving house I tried to follow the Git instructions, but something went wrong. Can someone give me a quick list of steps? I gather I need to set up an account on git hub, fork someone's code base (whose?), check out using git, make changes, commit using git...then how do I publish the changes somewhere useful? Thanks, Steve ___ Potlatch-dev mailing list Potlatch-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/potlatch-dev