{"thread":{"id":"30071","subject":"query: picking dependant commits from a latest tree","startedAt":"2012-03-27T09:55:05Z","lastAt":"2012-04-03T16:55:27Z","messageCount":4,"participants":["Shiraz Hashim","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"187845","messageId":"20120327095504.GM1806@localhost.localdomain","threadId":"30071","inReplyTo":null,"subject":"query: picking dependant commits from a latest tree","fromName":"Shiraz Hashim","fromEmail":"shiraz.hashim@st.com","sentAt":"2012-03-27T09:55:05Z","receivedAt":"2012-03-27T09:55:05Z","isPatch":false,"sender":{"key":"shiraz.hashim@st.com","avatar":null},"body":"Hi,\n\nIf I try to pick commits from a latest tree for a particular feature\nthen what is the best way to find out all dependant commits.\n\nSo for example for the commit which I want to pick there are 10 other\ncommits around that file but some affect other files which themselves\nhave several commits which I must apply.\n\nIs their a way to do this efficiently ?\n\n--\nregards\nShiraz\n"},{"id":"188176","messageId":"4F75DF56.10902@gmail.com","threadId":"30071","inReplyTo":"20120327095504.GM1806@localhost.localdomain","subject":"Re: query: picking dependant commits from a latest tree","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-30T16:29:10Z","receivedAt":"2012-03-30T16:29:10Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/27/2012 4:55 AM, Shiraz Hashim wrote:\n>\n> If I try to pick commits from a latest tree for a particular feature\n> then what is the best way to find out all dependant commits.\n>\n> So for example for the commit which I want to pick there are 10 other\n> commits around that file but some affect other files which themselves\n> have several commits which I must apply.\n>\n> Is their a way to do this efficiently ?\n>\nYou're assuming all dependencies reside in the same commits or in common \nfiles.  If the changes in a commit are dependent on the previous commit \nand they do not share any of the same files then what you are proposing \nis not going to catch that.\n\nv/r,\nneal\n"},{"id":"188381","messageId":"20120403040001.GQ1766@localhost.localdomain","threadId":"30071","inReplyTo":"4F75DF56.10902@gmail.com","subject":"Re: query: picking dependant commits from a latest tree","fromName":"Shiraz Hashim","fromEmail":"shiraz.hashim@st.com","sentAt":"2012-04-03T04:00:01Z","receivedAt":"2012-04-03T04:00:01Z","isPatch":false,"sender":{"key":"shiraz.hashim@st.com","avatar":null},"body":"Hi Neal,\n\nOn Sat, Mar 31, 2012 at 12:29:10AM +0800, Neal Kreitzinger wrote:\n> On 3/27/2012 4:55 AM, Shiraz Hashim wrote:\n> >\n> > If I try to pick commits from a latest tree for a particular feature\n> > then what is the best way to find out all dependant commits.\n> >\n> > So for example for the commit which I want to pick there are 10 other\n> > commits around that file but some affect other files which themselves\n> > have several commits which I must apply.\n> >\n> > Is their a way to do this efficiently ?\n> >\n> You're assuming all dependencies reside in the same commits or in common \n> files.  If the changes in a commit are dependent on the previous commit \n> and they do not share any of the same files then what you are proposing \n> is not going to catch that.\n\nYou are right, but this would perhaps be caught during tests. But in\nthe first place how can I find dependent commits to pass build test.\n\n--\nregards\nShiraz\n"},{"id":"188421","messageId":"4F7B2B7F.8050308@gmail.com","threadId":"30071","inReplyTo":"20120403040001.GQ1766@localhost.localdomain","subject":"Re: query: picking dependant commits from a latest tree","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-04-03T16:55:27Z","receivedAt":"2012-04-03T16:55:27Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 4/2/2012 11:00 PM, Shiraz Hashim wrote:\n> On Sat, Mar 31, 2012 at 12:29:10AM +0800, Neal Kreitzinger wrote:\n>> On 3/27/2012 4:55 AM, Shiraz Hashim wrote:\n>>> If I try to pick commits from a latest tree for a particular feature\n>>> then what is the best way to find out all dependant commits.\n>>>\n>>> So for example for the commit which I want to pick there are 10 other\n>>> commits around that file but some affect other files which themselves\n>>> have several commits which I must apply.\n>>>\n>>> Is their a way to do this efficiently ?\n>>>\n>> You're assuming all dependencies reside in the same commits or in common\n>> files.  If the changes in a commit are dependent on the previous commit\n>> and they do not share any of the same files then what you are proposing\n>> is not going to catch that.\n> You are right, but this would perhaps be caught during tests. But in\n> the first place how can I find dependent commits to pass build test.\n>\nTheoretically, all the ancestors of a commit are dependencies.  When you \ncherry-pick you run the risk of not getting dependencies.  That will be \nup to you to figure out.  Different software has different dependency \nscenarios.  IMO, you will analyze what yours specifically are and then \nperhaps submit more specific examples to the newsgroup.  There are many \npossibilities.\n\nJust one example is that you would have to write a script that scans \nyour all programs in your commit for called programs and then \ninterrogates history to see of any of the called programs were changed \nin other commits.  Of course you would have to repeat that and it could \nbe quite extensive.  You would also have to git-grep repo history for \nall callers of programs changed in your commit.  Of course you would \nhave to repeat that and it could be quite extensive.  Git is not going \nto do this for you.  You can use git to do powerful interrogations to \naid you in this.  Even after all of that, someone has to review the \nresults and make judgement calls on which dependencies matter and which \nones don't.  This is where your own knowledge or that of senior \n(system-wise) people has to make judgement calls.  Human knowledge of \nyour software is the best first approach at assessing commit \ndependencies, and then supplement it with git interrogations if you have \nany remaining questions or doubts.\n\nv/r,\nneal\n"}]}