{"thread":{"id":"13874","subject":"Project's repository infrastructure (sunbtree and submodules)","startedAt":"2008-06-09T15:12:03Z","lastAt":"2008-06-11T18:42:33Z","messageCount":3,"participants":["Armen Baghumian","Nigel Magnay"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"79233","messageId":"20080609194203.06698e01@debian","threadId":"13874","inReplyTo":null,"subject":"Project's repository infrastructure (sunbtree and submodules)","fromName":"Armen Baghumian","fromEmail":"armen@opensourceclub.org","sentAt":"2008-06-09T15:12:03Z","receivedAt":"2008-06-09T15:12:03Z","isPatch":false,"sender":{"key":"armen@opensourceclub.org","avatar":"https://gravatar.com/avatar/053186df366a9ab2986d1a6a119057a3d4fff3eb5ec8f9bad8558f514f9a9ff6?d=mp&s=160"},"body":"Hi,\n\nI have several projects which each project contains several modules.\nmodules are shared between projects.\n\nFor example let say there is three modules A, B, and C, and two\nproject called P1 and P2. P1 uses A and B modules and P2 uses B and C.\n\nI want to have centralized place to clone/pull/push in P1 and P2 and it\nwould be nice to push changes in modules(A,B,C) from projects\n(P1,P2) so when changes in B pushed from P1 it could be pulled from P2\n(think B as a shared module between P1 and P2). \n\nAs far as modules are not big enough I don't want to push changes\ndirectly in to those repositories.\n\nTo solve the problem I just create three separated repositories for\neach modules (A,B,C) and create two other repositories for each project\nand use git-submodule to add modules in each repository.\n\npushing changes to modules(A,B,C) are really error prone and annoying\nso I searched for a better way to solve that problem.\n\nSeems subtree merge[1] is other choice but I'm not sure.\n\n1) What is best way to solve such situation?\n2) If subtree is best choice how to push changes to modules(A,B,C) from\nprojects?\n\n--Armen\n\n[1]\nhttp://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n"},{"id":"79440","messageId":"20080611123457.442d1029@debian","threadId":"13874","inReplyTo":"20080609194203.06698e01@debian","subject":"Re: Project's repository infrastructure (sunbtree and submodules)","fromName":"Armen Baghumian","fromEmail":"armen@opensourceclub.org","sentAt":"2008-06-11T08:04:57Z","receivedAt":"2008-06-11T08:04:57Z","isPatch":false,"sender":{"key":"armen@opensourceclub.org","avatar":"https://gravatar.com/avatar/053186df366a9ab2986d1a6a119057a3d4fff3eb5ec8f9bad8558f514f9a9ff6?d=mp&s=160"},"body":"Hi,\n\nAm I asking totally wrong question or asking it in wrong place?\nwould you please point me to correct place or documentation.\n\n--Armen\n\nOn Mon, 9 Jun 2008 19:42:03 +0430\nArmen Baghumian <armen@OpenSourceClub.org> wrote:\n\n> Hi,\n> \n> I have several projects which each project contains several modules.\n> modules are shared between projects.\n> \n> For example let say there is three modules A, B, and C, and two\n> project called P1 and P2. P1 uses A and B modules and P2 uses B and C.\n> \n> I want to have centralized place to clone/pull/push in P1 and P2 and\n> it would be nice to push changes in modules(A,B,C) from projects\n> (P1,P2) so when changes in B pushed from P1 it could be pulled from P2\n> (think B as a shared module between P1 and P2). \n> \n> As far as modules are not big enough I don't want to push changes\n> directly in to those repositories.\n> \n> To solve the problem I just create three separated repositories for\n> each modules (A,B,C) and create two other repositories for each\n> project and use git-submodule to add modules in each repository.\n> \n> pushing changes to modules(A,B,C) are really error prone and annoying\n> so I searched for a better way to solve that problem.\n> \n> Seems subtree merge[1] is other choice but I'm not sure.\n> \n> 1) What is best way to solve such situation?\n> 2) If subtree is best choice how to push changes to modules(A,B,C)\n> from projects?\n> \n> --Armen\n> \n> [1]\n> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"79476","messageId":"320075ff0806111142g83d5ad4s4737d49b8af2dbf4@mail.gmail.com","threadId":"13874","inReplyTo":"20080609194203.06698e01@debian","subject":"Re: Project's repository infrastructure (sunbtree and submodules)","fromName":"Nigel Magnay","fromEmail":"nigel.magnay@gmail.com","sentAt":"2008-06-11T18:42:33Z","receivedAt":"2008-06-11T18:42:33Z","isPatch":false,"sender":{"key":"nigel.magnay@gmail.com","avatar":"https://gravatar.com/avatar/d85cf38287bef3a8e4fa02358d2756d7589f8676c5eeb881ce2f6d731e4526c3?d=mp&s=160"},"body":"On Mon, Jun 9, 2008 at 4:12 PM, Armen Baghumian\n<armen@opensourceclub.org> wrote:\n> Hi,\n>\n> I have several projects which each project contains several modules.\n> modules are shared between projects.\n>\n> For example let say there is three modules A, B, and C, and two\n> project called P1 and P2. P1 uses A and B modules and P2 uses B and C.\n>\n> I want to have centralized place to clone/pull/push in P1 and P2 and it\n> would be nice to push changes in modules(A,B,C) from projects\n> (P1,P2) so when changes in B pushed from P1 it could be pulled from P2\n> (think B as a shared module between P1 and P2).\n>\n> As far as modules are not big enough I don't want to push changes\n> directly in to those repositories.\n>\n> To solve the problem I just create three separated repositories for\n> each modules (A,B,C) and create two other repositories for each project\n> and use git-submodule to add modules in each repository.\n>\n> pushing changes to modules(A,B,C) are really error prone and annoying\n> so I searched for a better way to solve that problem.\n>\n> Seems subtree merge[1] is other choice but I'm not sure.\n>\n> 1) What is best way to solve such situation?\n> 2) If subtree is best choice how to push changes to modules(A,B,C) from\n> projects?\n>\n\nWhat we do (and I'm not sure it's best - but it works for us), is as\nyou describe :- repositories for the modules A,B,C, and use those as\nsubmodules in projects P1 and P2.\n\nIn each project P1, A, B there's a branch 'p1', and in each project\nP2, B, C there's a branch 'p2'. That way changes can be committed to B\nindependently, and not conflict. The 'owner' of B is responsible for\nmerging back to 'master' (which is the basis for any future project\nP3).\n\nThe git submodule commands are, however, quite verbose. There's a lot\nof typing, especially compared to svn, and it's particularly annoying\nfor the user to update P1, and find A, B are no longer on branch p1,\nbut have been reset to (no branch). That said, the infrastructure is\nthere, it just needs someone to think for a bit to work out what\nscripts would help most people's workflow (e.g : treat a superproject\nas if the subprojects don't really exist).\n"}]}