{"thread":{"id":"7832","subject":"using stgit/guilt for public branches","startedAt":"2007-04-25T12:20:49Z","lastAt":"2007-05-04T23:12:26Z","messageCount":12,"participants":["Michael S. Tsirkin","Josef Sipek","Robin Rosenberg","Yann Dirson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40396","messageId":"20070425122048.GD1624@mellanox.co.il","threadId":"7832","inReplyTo":null,"subject":"using stgit/guilt for public branches","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-25T12:20:49Z","receivedAt":"2007-04-25T12:20:49Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Hi!\nOn git.openfabrics.org we use git to manage all code for our OFED distribution.\nFor our kernel code we basically started with 2.6.20, and add some patches,\nwhich we currently keep separate from upstream kernel source - this makes\nit possible to update from upstream and extract the patches to post\nthem for upstream inclusion easily.\n\nOn the surface, it looks like using stg or guilt would be a good idea for us,\nhowever multiple people need to collaborate on the patch series.\n\nI am concerned that publishing a git branch managed by stg/guilt\nwould present problems: it seems that every time patches are re-ordered,\na patch is re-written or removed, or we update from upstream,\neveryone who pulls the tree branch will have a hard-to-resolve conflict.\n\nIs that really a problem? If so, would it be possible to work around this somehow?\n\nThanks,\n\n-- \nMST\n"},{"id":"40424","messageId":"20070425191838.GA6267@filer.fsl.cs.sunysb.edu","threadId":"7832","inReplyTo":"20070425122048.GD1624@mellanox.co.il","subject":"Re: using stgit/guilt for public branches","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-04-25T19:18:39Z","receivedAt":"2007-04-25T19:18:39Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:\n> Hi!\n> On git.openfabrics.org we use git to manage all code for our OFED distribution.\n> For our kernel code we basically started with 2.6.20, and add some patches,\n> which we currently keep separate from upstream kernel source - this makes\n> it possible to update from upstream and extract the patches to post\n> them for upstream inclusion easily.\n> \n> On the surface, it looks like using stg or guilt would be a good idea for us,\n> however multiple people need to collaborate on the patch series.\n> \n> I am concerned that publishing a git branch managed by stg/guilt\n> would present problems: it seems that every time patches are re-ordered,\n> a patch is re-written or removed, or we update from upstream,\n> everyone who pulls the tree branch will have a hard-to-resolve conflict.\n> \n> Is that really a problem? If so, would it be possible to work around this\n> somehow?\n\nI thought about this problem a while back when I was trying to decide how to\nmanage the Unionfs git repository. I came to the conclusion, that there was\nno clean way of doing this (at least not using guilt - I can't really speak\nfor stgit, as I don't know how it does things exactly).\n\nYou could try to use git to version the patches directory\n(.git/patches/$branch/) and publish that in addition to the actual kernel\nrepository.\n\nJosef \"Jeff\" Sipek.\n\n-- \nKeyboard not found!\nPress F1 to enter Setup\n"},{"id":"40430","messageId":"20070425195248.GA5217@mellanox.co.il","threadId":"7832","inReplyTo":"20070425191838.GA6267@filer.fsl.cs.sunysb.edu","subject":"Re: using stgit/guilt for public branches","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-04-25T19:52:48Z","receivedAt":"2007-04-25T19:52:48Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Josef Sipek <jsipek@fsl.cs.sunysb.edu>:\n> Subject: Re: using stgit/guilt for public branches\n> \n> You could try to use git to version the patches directory\n> (.git/patches/$branch/) and publish that in addition to the actual kernel\n> repository.\n\nHow does one do this, exactly?\n\n-- \nMST\n"},{"id":"40446","messageId":"20070425204007.GA9375@filer.fsl.cs.sunysb.edu","threadId":"7832","inReplyTo":"20070425195248.GA5217@mellanox.co.il","subject":"Re: using stgit/guilt for public branches","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-04-25T20:40:07Z","receivedAt":"2007-04-25T20:40:07Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Wed, Apr 25, 2007 at 10:52:48PM +0300, Michael S. Tsirkin wrote:\n> > Quoting Josef Sipek <jsipek@fsl.cs.sunysb.edu>:\n> > Subject: Re: using stgit/guilt for public branches\n> > \n> > You could try to use git to version the patches directory\n> > (.git/patches/$branch/) and publish that in addition to the actual kernel\n> > repository.\n> \n> How does one do this, exactly?\n\ncd .git/patches/$branch/\ngit-init-db\ngit-commit -a -m \"initial import\"\n\n\nThen set up this repository to push/pull.\n\n\nNo guarantees about it actually being helpful to your situation :)\n\nJosef \"Jeff\" Sipek.\n\n-- \nUNIX is user-friendly ... it's just selective about who it's friends are\n"},{"id":"40460","messageId":"200704252337.05851.robin.rosenberg.lists@dewire.com","threadId":"7832","inReplyTo":"20070425191838.GA6267@filer.fsl.cs.sunysb.edu","subject":"Re: using stgit/guilt for public branches","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-04-25T21:37:05Z","receivedAt":"2007-04-25T21:37:05Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"onsdag 25 april 2007 skrev Josef Sipek:\n> On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:\n[...]\n> > I am concerned that publishing a git branch managed by stg/guilt\n> > would present problems: it seems that every time patches are re-ordered,\n> > a patch is re-written or removed, or we update from upstream,\n> > everyone who pulls the tree branch will have a hard-to-resolve conflict.\n> > \n> > Is that really a problem? If so, would it be possible to work around this\n> > somehow?\n> \n> I thought about this problem a while back when I was trying to decide how to\n> manage the Unionfs git repository. I came to the conclusion, that there was\n> no clean way of doing this (at least not using guilt - I can't really speak\n> for stgit, as I don't know how it does things exactly).\n\nStGit has the same problem. Publishing such a branch is only for viewing if\nyou want to publish the tip, like the pu branch in the Git repo. You shouldn't\nmerge from pu either.\n\nPatches your are done and not stored as patches anymore can be propagated \nto a \"stable\" branch using git branch -f stable HEAD~$(stg applied|wc -l) \nwhich is then pushed like  any other branch. Don't play the stg uncommit game \ntoo much to avoid a mess.\n\nI'm  not sure the branch command is the best way, but you get the idea.\n\n-- robin\n"},{"id":"40981","messageId":"20070503205836.GA19253@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"7832","inReplyTo":"200704252337.05851.robin.rosenberg.lists@dewire.com","subject":"Re: using stgit/guilt for public branches","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-05-03T20:58:36Z","receivedAt":"2007-05-03T20:58:36Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Wed, Apr 25, 2007 at 11:37:05PM +0200, Robin Rosenberg wrote:\n> onsdag 25 april 2007 skrev Josef Sipek:\n> > On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:\n> [...]\n> > > I am concerned that publishing a git branch managed by stg/guilt\n> > > would present problems: it seems that every time patches are re-ordered,\n> > > a patch is re-written or removed, or we update from upstream,\n> > > everyone who pulls the tree branch will have a hard-to-resolve conflict.\n> > > \n> > > Is that really a problem? If so, would it be possible to work around this\n> > > somehow?\n> > \n> > I thought about this problem a while back when I was trying to decide how to\n> > manage the Unionfs git repository. I came to the conclusion, that there was\n> > no clean way of doing this (at least not using guilt - I can't really speak\n> > for stgit, as I don't know how it does things exactly).\n> \n> StGit has the same problem. Publishing such a branch is only for viewing if\n> you want to publish the tip, like the pu branch in the Git repo. You shouldn't\n> merge from pu either.\n\nYou are right, in that what can be done with such branches is limited.\nBUT you can safely \"stg branch --create\" off any remote stgit stack.\nThen you can \"stg rebase origin/master\" to port your stack to the new\ntip of the remote stack.\n\nThe next stgit release will allow you to declare the pull-policy for\nyour stack as \"rebase\", so when you \"stg pull\" it will indeed rebase\nto the new tip of the parent branch.\n\n\nAs for publishing, I use the following config entries to publish my\nown stack of patches to stgit.  You can see at\nhttp://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly\nthe structure of the stack (even though things could surely be made\nbetter).\n\nI use \"git push -f\" to publish - maybe the \"+\" refspec syntax would\nwork with push, I'll try it next time :)\n\n[remote \"orcz\"]\n        url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git\n        push = refs/heads/master:refs/heads/master\n\tpush = refs/patches/master/*:refs/patches/master/*\n\nMaybe we should provide some degree of automation in stgit itself\n(eg. \"stg branch --publish\" or something).\n\nHope this helps,\n-- \nYann.\n"},{"id":"40992","messageId":"200705040110.34697.robin.rosenberg.lists@dewire.com","threadId":"7832","inReplyTo":"20070503205836.GA19253@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: using stgit/guilt for public branches","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-05-03T23:10:33Z","receivedAt":"2007-05-03T23:10:33Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"torsdag 03 maj 2007 skrev Yann Dirson:\n[...]\n> As for publishing, I use the following config entries to publish my\n> own stack of patches to stgit.  You can see at\n> http://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly\n> the structure of the stack (even though things could surely be made\n> better).\n> \n> I use \"git push -f\" to publish - maybe the \"+\" refspec syntax would\n> work with push, I'll try it next time :)\n> \n> [remote \"orcz\"]\n>         url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git\n>         push = refs/heads/master:refs/heads/master\n> \tpush = refs/patches/master/*:refs/patches/master/*\n\nBeautiful!!\n\nI needed to change the update commit though for git to recognize the\nrefs/patches heads. Or is that only because I had initialized the repos\nusing v1.5.0 ?\n\n-- robin\n"},{"id":"40994","messageId":"200705040131.17837.robin.rosenberg.lists@dewire.com","threadId":"7832","inReplyTo":"200705040110.34697.robin.rosenberg.lists@dewire.com","subject":"Re: using stgit/guilt for public branches","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-05-03T23:31:17Z","receivedAt":"2007-05-03T23:31:17Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"fredag 04 maj 2007 skrev Robin Rosenberg:\n> torsdag 03 maj 2007 skrev Yann Dirson:\n> [...]\n> > As for publishing, I use the following config entries to publish my\n> > own stack of patches to stgit.  You can see at\n> > http://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly\n> > the structure of the stack (even though things could surely be made\n> > better).\n> > \n> > I use \"git push -f\" to publish - maybe the \"+\" refspec syntax would\n> > work with push, I'll try it next time :)\n> > \n> > [remote \"orcz\"]\n> >         url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git\n> >         push = refs/heads/master:refs/heads/master\n> > \tpush = refs/patches/master/*:refs/patches/master/*\n> \n> Beautiful!!\n> \nWould it be possible to push only applied patches, and drop unapplied\nones? It would only matter when one wants to prune the remote repo\nso it may not be terribly important, but it seems I pushed quite a \nlot of references from old patches that I haven't decided what to do\nwith yet and those will get new commit id's anyway.\n\n-- robin\n"},{"id":"41006","messageId":"20070504052042.GA4829@mellanox.co.il","threadId":"7832","inReplyTo":"20070503205836.GA19253@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: using stgit/guilt for public branches","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-05-04T05:20:59Z","receivedAt":"2007-05-04T05:20:59Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Yann Dirson <ydirson@altern.org>:\n> Subject: Re: using stgit/guilt for public branches\n> \n> On Wed, Apr 25, 2007 at 11:37:05PM +0200, Robin Rosenberg wrote:\n> > onsdag 25 april 2007 skrev Josef Sipek:\n> > > On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:\n> > [...]\n> > > > I am concerned that publishing a git branch managed by stg/guilt\n> > > > would present problems: it seems that every time patches are re-ordered,\n> > > > a patch is re-written or removed, or we update from upstream,\n> > > > everyone who pulls the tree branch will have a hard-to-resolve conflict.\n> > > > \n> > > > Is that really a problem? If so, would it be possible to work around this\n> > > > somehow?\n> > > \n> > > I thought about this problem a while back when I was trying to decide how to\n> > > manage the Unionfs git repository. I came to the conclusion, that there was\n> > > no clean way of doing this (at least not using guilt - I can't really speak\n> > > for stgit, as I don't know how it does things exactly).\n> > \n> > StGit has the same problem. Publishing such a branch is only for viewing if\n> > you want to publish the tip, like the pu branch in the Git repo. You shouldn't\n> > merge from pu either.\n> \n> You are right, in that what can be done with such branches is limited.\n> BUT you can safely \"stg branch --create\" off any remote stgit stack.\n> Then you can \"stg rebase origin/master\" to port your stack to the new\n> tip of the remote stack.\n\nOK.\nWhat happens if someone clones the repo, then reorders patches,\ndrops some of them, adds new patches in the middle of the stack?\n\n-- \nMST\n"},{"id":"41092","messageId":"20070504212842.GB19253@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"7832","inReplyTo":"200705040131.17837.robin.rosenberg.lists@dewire.com","subject":"Re: using stgit/guilt for public branches","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-05-04T21:28:42Z","receivedAt":"2007-05-04T21:28:42Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Fri, May 04, 2007 at 01:31:17AM +0200, Robin Rosenberg wrote:\n> fredag 04 maj 2007 skrev Robin Rosenberg:\n> > torsdag 03 maj 2007 skrev Yann Dirson:\n> > [...]\n> > > As for publishing, I use the following config entries to publish my\n> > > own stack of patches to stgit.  You can see at\n> > > http://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly\n> > > the structure of the stack (even though things could surely be made\n> > > better).\n> > > \n> > > I use \"git push -f\" to publish - maybe the \"+\" refspec syntax would\n> > > work with push, I'll try it next time :)\n> > > \n> > > [remote \"orcz\"]\n> > >         url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git\n> > >         push = refs/heads/master:refs/heads/master\n> > > \tpush = refs/patches/master/*:refs/patches/master/*\n> > \n> > Beautiful!!\n> > \n> Would it be possible to push only applied patches, and drop unapplied\n> ones?\n\nThis would require stgit-level knowledge, so we would need an stgit\ncommand.\n\nMaybe \"stg publish\" or \"stg branch --publish\" with the current syntax,\nsince we already have \"push\".  I'd be in favor of \"stg branch push\"\nfor the next-gen syntax, though ;)\n\n> It would only matter when one wants to prune the remote repo\n> so it may not be terribly important, but it seems I pushed quite a \n> lot of references from old patches that I haven't decided what to do\n> with yet and those will get new commit id's anyway.\n\nFor now you can delete them manually with \"git push remote/ref:\".\n\nBest regards,\n-- \nYann.\n"},{"id":"41093","messageId":"20070504213741.GC19253@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"7832","inReplyTo":"20070504052042.GA4829@mellanox.co.il","subject":"Re: using stgit/guilt for public branches","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-05-04T21:37:41Z","receivedAt":"2007-05-04T21:37:41Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Fri, May 04, 2007 at 08:20:59AM +0300, Michael S. Tsirkin wrote:\n> > Quoting Yann Dirson <ydirson@altern.org>:\n> > Subject: Re: using stgit/guilt for public branches\n> > \n> > On Wed, Apr 25, 2007 at 11:37:05PM +0200, Robin Rosenberg wrote:\n> > > onsdag 25 april 2007 skrev Josef Sipek:\n> > > > On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:\n> > > [...]\n> > > > > I am concerned that publishing a git branch managed by stg/guilt\n> > > > > would present problems: it seems that every time patches are re-ordered,\n> > > > > a patch is re-written or removed, or we update from upstream,\n> > > > > everyone who pulls the tree branch will have a hard-to-resolve conflict.\n> > > > > \n> > > > > Is that really a problem? If so, would it be possible to work around this\n> > > > > somehow?\n> > > > \n> > > > I thought about this problem a while back when I was trying to decide how to\n> > > > manage the Unionfs git repository. I came to the conclusion, that there was\n> > > > no clean way of doing this (at least not using guilt - I can't really speak\n> > > > for stgit, as I don't know how it does things exactly).\n> > > \n> > > StGit has the same problem. Publishing such a branch is only for viewing if\n> > > you want to publish the tip, like the pu branch in the Git repo. You shouldn't\n> > > merge from pu either.\n> > \n> > You are right, in that what can be done with such branches is limited.\n> > BUT you can safely \"stg branch --create\" off any remote stgit stack.\n> > Then you can \"stg rebase origin/master\" to port your stack to the new\n> > tip of the remote stack.\n> \n> OK.\n> What happens if someone clones the repo, then reorders patches,\n> drops some of them, adds new patches in the middle of the stack?\n\nYou can't do that out of the box, since you don't get a real stack\nwhen you clone it, you only get the refs.  You would need to uncommit\npatches manually, and there will not be much support to help you.\n\nNow you're forcing me to unveil my secret plans :)\n\n1. it would be quite easy to reconstruct a full-fledged stack from\nthose refs, and since you get the remote patchlogs, we could also\nfetch any former version of the patch that would be still available\n(more work for \"stg clone\")\n\n2. if noone beats me to doing that, I'll enhance patchlogs some day to\nrecord branching in patchlogs (eg. from \"stg branch --clone\" or \"stg\npick\"), as well as merges (eg. from \"stg sync\")\n\nNote that proper merging from patchlog history will require working at\nthe meta-diff (ie. \"diffs of diffs of trees\") level, just like proper\nmerging at tree-level requires working at the diff level.  I don't\nthink we have the tools for this yet, so we still have a long way to\ngo :)\n\n\nBest regards,\n-- \nYann.\n"},{"id":"41102","messageId":"20070504231225.GD19253@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"7832","inReplyTo":"20070503205836.GA19253@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: using stgit/guilt for public branches","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-05-04T23:12:26Z","receivedAt":"2007-05-04T23:12:26Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Thu, May 03, 2007 at 10:58:36PM +0200, Yann Dirson wrote:\n> As for publishing, I use the following config entries to publish my\n> own stack of patches to stgit.  You can see at\n> http://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly\n> the structure of the stack (even though things could surely be made\n> better).\n\nLet's make things even more fun: I have now moved a couple of patches\n(testsuite cases to demonstrate bugs still to be fixed) to a new stack\nso they don't get pulled by error.  This stack itself is forked off my\nmaster stack, and I just have to \"stg pull\" to get it rebased to the\nnew master head (requires stgit head, not in 0.12*):\n\n[branch \"bugs.stgit\"]\n        pull-policy = rebase\n        parentbranch = master\n\n> I use \"git push -f\" to publish - maybe the \"+\" refspec syntax would\n> work with push, I'll try it next time :)\n\nIt indeed works as expected, so the final syntax is as follows, so\n\"git push orcz\" is now sufficient to publish everything, and you can\nnow fork your own stack off my remote \"bugs\" stack, which itself\nforked off my \"master\" stack - enjoy :)\n\n[remote \"orcz\"]\n        url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git\n        fetch = +refs/heads/*:refs/remotes/orcz/*\n\n        push = +refs/heads/master:refs/heads/master\n        push = +refs/patches/master/*:refs/patches/master/*\n\n        push = +refs/heads/bugs:refs/heads/bugs\n        push = +refs/patches/bugs/*:refs/patches/bugs/*\n\nBest regards,\n-- \nYann.\n"}]}