{"thread":{"id":"336","subject":"Cogito Tutorial If It Helps","startedAt":"2005-04-26T20:52:27Z","lastAt":"2005-04-28T05:40:19Z","messageCount":10,"participants":["James Purser","Petr Baudis","Alan Chandler","Benjamin Herrenschmidt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"1796","messageId":"1114548747.3083.1.camel@kryten","threadId":"336","inReplyTo":null,"subject":"Cogito Tutorial If It Helps","fromName":"James Purser","fromEmail":"purserj@ksit.dynalias.com","sentAt":"2005-04-26T20:52:27Z","receivedAt":"2005-04-26T20:52:27Z","isPatch":false,"sender":{"key":"purserj@ksit.dynalias.com","avatar":null},"body":"I reworked the previous tutorial to take in the changes in the scripts.\nWill make this a series of tutorials to cover all aspects. Any\nsuggestions or hints or spelling corrections would be most welcome.\n\nhttp://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n-- \nJames Purser\nhttp://ksit.dynalias.com\n\n"},{"id":"1800","messageId":"20050426211834.GO13224@pasky.ji.cz","threadId":"336","inReplyTo":"1114548747.3083.1.camel@kryten","subject":"Re: Cogito Tutorial If It Helps","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-26T21:18:35Z","receivedAt":"2005-04-26T21:18:35Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Apr 26, 2005 at 10:52:27PM CEST, I got a letter\nwhere James Purser <purserj@ksit.dynalias.com> told me that...\n> I reworked the previous tutorial to take in the changes in the scripts.\n> Will make this a series of tutorials to cover all aspects. Any\n> suggestions or hints or spelling corrections would be most welcome.\n> \n> http://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n\nThanks for writing that! :-)\n\nI'd vote for describing the cg-update right near cg-pull, or perhaps\neven before cg-update, as the primary method; I think it's commonly what\npeople really want to do when they do cg-pull anyway.\n\ncg-merge is _not_ like doing cg-diff | cg-patch - that's a dangerous\nthought, and not true at all. cg-diff | cg-patch will just apply the\ngiven diff to your working directory, but it won't record any merging\nmetadata, will often get it very wrong, and you will get to all sorts of\nother troubles. Just always use cg-merge. And probably pass it -b only\nwhen you know what are you doing.\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"1805","messageId":"1114551403.3083.3.camel@kryten","threadId":"336","inReplyTo":"20050426211834.GO13224@pasky.ji.cz","subject":"Re: Cogito Tutorial If It Helps","fromName":"James Purser","fromEmail":"purserj@ksit.dynalias.com","sentAt":"2005-04-26T21:36:43Z","receivedAt":"2005-04-26T21:36:43Z","isPatch":false,"sender":{"key":"purserj@ksit.dynalias.com","avatar":null},"body":"On Wed, 2005-04-27 at 07:18, Petr Baudis wrote:\n> Dear diary, on Tue, Apr 26, 2005 at 10:52:27PM CEST, I got a letter\n> where James Purser <purserj@ksit.dynalias.com> told me that...\n> > I reworked the previous tutorial to take in the changes in the scripts.\n> > Will make this a series of tutorials to cover all aspects. Any\n> > suggestions or hints or spelling corrections would be most welcome.\n> > \n> > http://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n> \n> Thanks for writing that! :-)\n> \n> I'd vote for describing the cg-update right near cg-pull, or perhaps\n> even before cg-update, as the primary method; I think it's commonly what\n> people really want to do when they do cg-pull anyway.\n> \n> cg-merge is _not_ like doing cg-diff | cg-patch - that's a dangerous\n> thought, and not true at all. cg-diff | cg-patch will just apply the\n> given diff to your working directory, but it won't record any merging\n> metadata, will often get it very wrong, and you will get to all sorts of\n> other troubles. Just always use cg-merge. And probably pass it -b only\n> when you know what are you doing.\n> \n> Thanks,\n\nThanks for that, I've changed it a little to point out that cg-patch\nshould really only be used for small single file patches.\n-- \nJames Purser\nhttp://ksit.dynalias.com\n\n"},{"id":"1806","messageId":"20050426214038.GP13224@pasky.ji.cz","threadId":"336","inReplyTo":"1114551403.3083.3.camel@kryten","subject":"Re: Cogito Tutorial If It Helps","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-26T21:40:38Z","receivedAt":"2005-04-26T21:40:38Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Apr 26, 2005 at 11:36:43PM CEST, I got a letter\nwhere James Purser <purserj@ksit.dynalias.com> told me that...\n> On Wed, 2005-04-27 at 07:18, Petr Baudis wrote:\n> > cg-merge is _not_ like doing cg-diff | cg-patch - that's a dangerous\n> > thought, and not true at all. cg-diff | cg-patch will just apply the\n> > given diff to your working directory, but it won't record any merging\n> > metadata, will often get it very wrong, and you will get to all sorts of\n> > other troubles. Just always use cg-merge. And probably pass it -b only\n> > when you know what are you doing.\n> \n> Thanks for that, I've changed it a little to point out that cg-patch\n> should really only be used for small single file patches.\n\nNo, you've missed the point. It isn't the size of the change what\nmatters - cg-patch should handle even huge patches (mostly) fine.  What\nmatters is that you just did was not merge. It was applying some patch\nto your working tree, but not merging branches.\n\nSo after doing cg-diff | cg-patch several times, you have your working\ntree full of huge local changes (making it impossible to sensibly\ncg-merge) and your last commit happenned long ago. Or you commit the\ncg-patch results, but your commits are wrong, since they don't carry the\nappropriate merge information.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"1883","messageId":"200504271922.07765.alan@chandlerfamily.org.uk","threadId":"336","inReplyTo":"1114548747.3083.1.camel@kryten","subject":"Re: Cogito Tutorial If It Helps","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-04-27T18:22:07Z","receivedAt":"2005-04-27T18:22:07Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Tuesday 26 April 2005 21:52, James Purser wrote:\n> I reworked the previous tutorial to take in the changes in the scripts.\n> Will make this a series of tutorials to cover all aspects. Any\n> suggestions or hints or spelling corrections would be most welcome.\n>\n> http://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n\nAlthough I have been reading this mailing list since almost the beginning, I \nhave not had a chance to download and try anything.  Using this message as an \nincentive to start, I started to follow this.\n\nHowever I have run into problems.  \n\nLet me try and explain.\n\nThe first part of the tutorial of loading the tarball and building things is \nfine (should be, its a well trodden mental model) - and actually for me I did \nnot have libcurl3-dev installed the first time - but because I already had \nthe mental model in my mind on this stage it was easy to fit.\n\nI then issued the cg-clone command to get a fresh copy of cogito.  This is \nwhere I think it would be useful to take time-out from the tutorial and \nexplain what I have here.  For me at least, if I don't have a mental model of \nwhat is happening, I am totally confused.\n\nI \"think\" I understand the git repository with the various content addressable \nobjects.  Reading the README file describes that quite well.  I assume that \nis what is stored in the .git subdirectory (although I have yet to find any \ntext that formally says that).\n\nWhere I am confused is the relationship between what is in the .git \nsubdirectory and the project tree of cogito that sits around it.  Obviously I \nunderstand that its the latest version of the project as represented by the \nobjects in the repository, but what I don't really understand (and neither \nyour tutorial nor all the explanations of each of the commands in the README \nreally explain it either) is how the various commands adjust the \nrelationship.\n\nFor instance cg-branch-add seems to add a branch to the repository from a url \n(I assume it downloads any \"blobs\" etc that are not already in my local \nrepository and creates a tag that identifies the head of a tree object), but \na don't understand how I am supposed see that particular branch as expanded \ncode.  (I suspect it might be cg-seek, but I am not really sure - and if it \nis how do you find out what branch this expanded code is now pointed to?).  \nBut what do cg-update and cg-pull do in terms of the uncompressed code \nsitting in the surrounding directory round the repository, particularly when \nyou perform them on a branch that is not the one that the code refers to.  \n\n\nThe reason I raise all this, is when I follow through on your tutorial and get \nto the cg-diff stage I get this\n\nxargs: cg-Xdiffdo: No such file or directory\n\nAnd I have absolutely no idea whats wrong or where to start looking.\n\n\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"},{"id":"1891","messageId":"20050427193227.GF22956@pasky.ji.cz","threadId":"336","inReplyTo":"200504271922.07765.alan@chandlerfamily.org.uk","subject":"Re: Cogito Tutorial If It Helps","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-27T19:32:27Z","receivedAt":"2005-04-27T19:32:27Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Wed, Apr 27, 2005 at 08:22:07PM CEST, I got a letter\nwhere Alan Chandler <alan@chandlerfamily.org.uk> told me that...\n> Where I am confused is the relationship between what is in the .git \n> subdirectory and the project tree of cogito that sits around it.  Obviously I \n> understand that its the latest version of the project as represented by the \n> objects in the repository, but what I don't really understand (and neither \n> your tutorial nor all the explanations of each of the commands in the README \n> really explain it either) is how the various commands adjust the \n> relationship.\n> \n> For instance cg-branch-add seems to add a branch to the repository from a url \n> (I assume it downloads any \"blobs\" etc that are not already in my local \n> repository and creates a tag that identifies the head of a tree object), but \n> a don't understand how I am supposed see that particular branch as expanded \n> code.  (I suspect it might be cg-seek, but I am not really sure - and if it \n> is how do you find out what branch this expanded code is now pointed to?).  \n> But what do cg-update and cg-pull do in terms of the uncompressed code \n> sitting in the surrounding directory round the repository, particularly when \n> you perform them on a branch that is not the one that the code refers to.  \n\nThose commands affect your working tree:\n\n\tcg-cancel\n\t\tCancels out any modifications in the working tree w.r.t.\n\t\tthe last commit\n\tcg-merge\n\t\tMerges changes done in another branch to your current\n\t\tbranch\n\tcg-patch\n\t\tApplies a patch, with regard to special git-specific\n\t\tinfo generated by cg-diff\n\tcg-rm\n\t\tRemoved the file from your working tree if it's still\n\t\taround\n\tcg-seek\n\t\tChanges your working tree to match some other commit in\n\t\tthe database\n\tcg-update\n\t\tPotentially brings in changes from a remote branch, and\n\t\tupdates your working tree to the latest commit + those\n\t\tchanges\n\nThose commands affect the objects database:\n\n\tcg-commit\n\tcg-pull\n\t\tcg-pull just gets the data from remote objects database\n\t\tto the local objects database; it is the \"first part\"\n\t\tof what cg-update does\n\tcg-update\n\nThis affects both:\n\n\tcg-merge\n\t\tNot directly, but it can call cg-commit automatically.\n\tcg-update\n\n> The reason I raise all this, is when I follow through on your tutorial and get \n> to the cg-diff stage I get this\n> \n> xargs: cg-Xdiffdo: No such file or directory\n> \n> And I have absolutely no idea whats wrong or where to start looking.\n\nYou didn't do make install and you don't have the cogito tree in your $PATH.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"1918","messageId":"200504272315.22939.alan@chandlerfamily.org.uk","threadId":"336","inReplyTo":"20050427193227.GF22956@pasky.ji.cz","subject":"Re: Cogito Tutorial If It Helps","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-04-27T22:15:22Z","receivedAt":"2005-04-27T22:15:22Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Wednesday 27 April 2005 20:32, Petr Baudis wrote:\n\n> Those commands affect your working tree:\n>\n> \tcg-cancel\n> \t\tCancels out any modifications in the working tree w.r.t.\n> \t\tthe last commit\n> \tcg-merge\n> \t\tMerges changes done in another branch to your current\n> \t\tbranch\n> \tcg-patch\n> \t\tApplies a patch, with regard to special git-specific\n> \t\tinfo generated by cg-diff\n> \tcg-rm\n> \t\tRemoved the file from your working tree if it's still\n> \t\taround\n> \tcg-seek\n> \t\tChanges your working tree to match some other commit in\n> \t\tthe database\n> \tcg-update\n> \t\tPotentially brings in changes from a remote branch, and\n> \t\tupdates your working tree to the latest commit + those\n> \t\tchanges\n>\n> Those commands affect the objects database:\n>\n> \tcg-commit\n> \tcg-pull\n> \t\tcg-pull just gets the data from remote objects database\n> \t\tto the local objects database; it is the \"first part\"\n> \t\tof what cg-update does\n> \tcg-update\n>\n> This affects both:\n>\n> \tcg-merge\n> \t\tNot directly, but it can call cg-commit automatically.\n> \tcg-update\n\n\nThanks - that makes things a lot clearer\n\n>\n> > The reason I raise all this, is when I follow through on your tutorial\n> > and get to the cg-diff stage I get this\n> >\n> > xargs: cg-Xdiffdo: No such file or directory\n> >\n> > And I have absolutely no idea whats wrong or where to start looking.\n>\n> You didn't do make install and you don't have the cogito tree in your\n> $PATH.\n\nI DID do a make install - which put everything in ~/bin (including cg-Xdiffdo) \nand ~/bin is the first item in my $PATH.\n\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"},{"id":"1953","messageId":"1114649337.7112.208.camel@gaston","threadId":"336","inReplyTo":"1114548747.3083.1.camel@kryten","subject":"Re: Cogito Tutorial If It Helps","fromName":"Benjamin Herrenschmidt","fromEmail":"benh@kernel.crashing.org","sentAt":"2005-04-28T00:48:57Z","receivedAt":"2005-04-28T00:48:57Z","isPatch":false,"sender":{"key":"benh@kernel.crashing.org","avatar":null},"body":"On Wed, 2005-04-27 at 06:52 +1000, James Purser wrote:\n> I reworked the previous tutorial to take in the changes in the scripts.\n> Will make this a series of tutorials to cover all aspects. Any\n> suggestions or hints or spelling corrections would be most welcome.\n> \n> http://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n\nHrm... this tutorial is exactly like cogito's own readme as far as I'm\nconcerned : it just makes things even more confusing to me. I must be\nreally stupid, I should stick to hacking the kernel and not try to use\nuserland tools :)\n\nAnyway, can you explain what it is all about this branch thing ?\n\nI don't understand why in hell you would want linux-2.6 to be a branch\nof cogito itself ... \n\nBen.\n\n\n"},{"id":"1954","messageId":"1114649466.7183.210.camel@gaston","threadId":"336","inReplyTo":"1114649337.7112.208.camel@gaston","subject":"Re: Cogito Tutorial If It Helps","fromName":"Benjamin Herrenschmidt","fromEmail":"benh@kernel.crashing.org","sentAt":"2005-04-28T00:51:05Z","receivedAt":"2005-04-28T00:51:05Z","isPatch":false,"sender":{"key":"benh@kernel.crashing.org","avatar":null},"body":"On Thu, 2005-04-28 at 10:48 +1000, Benjamin Herrenschmidt wrote:\n> On Wed, 2005-04-27 at 06:52 +1000, James Purser wrote:\n> > I reworked the previous tutorial to take in the changes in the scripts.\n> > Will make this a series of tutorials to cover all aspects. Any\n> > suggestions or hints or spelling corrections would be most welcome.\n> > \n> > http://ksit.dynalias.com/articles.php?s_id=46&art_id=41\n> \n> Hrm... this tutorial is exactly like cogito's own readme as far as I'm\n> concerned : it just makes things even more confusing to me. I must be\n> really stupid, I should stick to hacking the kernel and not try to use\n> userland tools :)\n> \n> Anyway, can you explain what it is all about this branch thing ?\n> \n> I don't understand why in hell you would want linux-2.6 to be a branch\n> of cogito itself ... \n\nForget it, I must be lacking caffeine this morning, you are adding linus\ngit, not linux-2.6 as a branch which  makes a lot more sense... sorry\nfor the noise.\n\nBen.\n\n\n"},{"id":"2002","messageId":"200504280640.19543.alan@chandlerfamily.org.uk","threadId":"336","inReplyTo":"200504272315.22939.alan@chandlerfamily.org.uk","subject":"Re: Cogito Tutorial If It Helps","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-04-28T05:40:19Z","receivedAt":"2005-04-28T05:40:19Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Wednesday 27 April 2005 23:15, Alan Chandler wrote:\n> On Wednesday 27 April 2005 20:32, Petr Baudis wrote:\n\n> > You didn't do make install and you don't have the cogito tree in your\n> > $PATH.\n>\n> I DID do a make install - which put everything in ~/bin (including\n> cg-Xdiffdo) and ~/bin is the first item in my $PATH.\n\nThanks to James Purser its fixed.\n\nI needed the full path to ~/bin rather than just using the ~ in $PATH.\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"}]}