{"thread":{"id":"1585","subject":"Questions on 'cvs migration guide''","startedAt":"2005-08-19T03:17:22Z","lastAt":"2005-08-19T15:18:07Z","messageCount":4,"participants":["Martin Langhoff","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"7541","messageId":"46a038f9050818201717f9ed93@mail.gmail.com","threadId":"1585","inReplyTo":null,"subject":"Questions on 'cvs migration guide''","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-08-19T03:17:22Z","receivedAt":"2005-08-19T03:17:22Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"In the section 'Emulating CVS behaviour', where the team setup is\ndescribed with a team 'merger'. What is not clear is how to deal with\nproject-wide branches. Should they be created in the master repo, and\neveryone clone a new repo from it?\n\nWith a team of 10 people, and perhaps 4 or 5 branches, the setup to\npull stuff back seems messy.\n\nAnd yet another question: the teammember who is pulling must 'switch'\nthe merging repo to the right branch, pull from the corresponding\nremote repos of each teammember, and push to the public view of the\nrepo. Is that right?\n\ncheers,\n\n\nmartin\n"},{"id":"7546","messageId":"Pine.LNX.4.58.0508182130050.3412@g5.osdl.org","threadId":"1585","inReplyTo":"46a038f9050818201717f9ed93@mail.gmail.com","subject":"Re: Questions on 'cvs migration guide''","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-08-19T04:33:24Z","receivedAt":"2005-08-19T04:33:24Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 19 Aug 2005, Martin Langhoff wrote:\n>\n> In the section 'Emulating CVS behaviour', where the team setup is\n> described with a team 'merger'. What is not clear is how to deal with\n> project-wide branches. Should they be created in the master repo, and\n> everyone clone a new repo from it?\n\nJust make them another branch in the master repo. Whether people will \nclone a whole new repo for it, or have just one repo and switch between \nlocal branches in their own local (single) repo is their personal choice. \nSome people may well prefer to have all different branches checked out in \ndifferent places (ie have one repository per branch) others may prefer to \nwork with one repository and just switch.\n\n> And yet another question: the teammember who is pulling must 'switch'\n> the merging repo to the right branch, pull from the corresponding\n> remote repos of each teammember, and push to the public view of the\n> repo. Is that right?\n\n.. yes. Or alternatively, just keep the repo at that branch (and if such a \nperson works on multiple branches, he/she can thus just keep multiple \nrepos). \n\n\t\tLinus\n"},{"id":"7547","messageId":"46a038f9050818225865deb7ee@mail.gmail.com","threadId":"1585","inReplyTo":"Pine.LNX.4.58.0508182130050.3412@g5.osdl.org","subject":"Re: Questions on 'cvs migration guide''","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-08-19T05:58:07Z","receivedAt":"2005-08-19T05:58:07Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 8/19/05, Linus Torvalds <torvalds@osdl.org> wrote:\n> > And yet another question: the teammember who is pulling must 'switch'\n> > the merging repo to the right branch, pull from the corresponding\n> > remote repos of each teammember, and push to the public view of the\n> > repo. Is that right?\n> \n> .. yes. Or alternatively, just keep the repo at that branch (and if such a\n> person works on multiple branches, he/she can thus just keep multiple\n> repos).\n\nI'm keen on keeping my 'merge & publish' step in a single repo that\nhas all the 'team' branches. The person running this repo will\nprobably actually code in separate repos, and merge in there too.\n\nRight now I'm switching 'heads' (I'm getting used to cogito's use of\n'branch' for 'remote head') using this quick'n'dirty bit of shell:\n\n#!/bin/bash \n\nHEADNAME=$1\n\nif [ -e .git/refs/heads/$HEADNAME ]; then\n\tcd .git/\n\tln -s -f .git/refs/heads/$HEADNAME HEAD\n\tcd ..\n\tcg-reset\n\tcg-restore -f\n\nfi;\n\nbut I want to prevent the action if the checkout is 'dirty'. Is there\nany way to check whether cg-diff thinks anything has changed?\n\ncheers,\n\n\nmartin\n"},{"id":"7563","messageId":"Pine.LNX.4.58.0508190812490.3412@g5.osdl.org","threadId":"1585","inReplyTo":"46a038f9050818225865deb7ee@mail.gmail.com","subject":"Re: Questions on 'cvs migration guide''","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-08-19T15:18:07Z","receivedAt":"2005-08-19T15:18:07Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 19 Aug 2005, Martin Langhoff wrote:\n> \n> I'm keen on keeping my 'merge & publish' step in a single repo that\n> has all the 'team' branches. The person running this repo will\n> probably actually code in separate repos, and merge in there too.\n\nI would suggest against a person owning a \"merge and publish\". Instead, \njust have a public repo that everybody involved to can push to - _they_ \nwill need to merge before they push (since a push won't accept a unrelated \nparent), but that way anybody can export their changes at any time, \nexactly like with a central CVS repository.\n\n> Right now I'm switching 'heads' (I'm getting used to cogito's use of\n> 'branch' for 'remote head') using this quick'n'dirty bit of shell:\n\nNo, just do\n\n\tgit checkout <headname>\n\n> but I want to prevent the action if the checkout is 'dirty'. Is there\n> any way to check whether cg-diff thinks anything has changed?\n\nIf you use \"git checkout\" to switch branches, it will do that testing for \nyou. You can still _force_ a head switch with \"git checkout -f\".\n\nOh, and if a file was dirty that is the same in both heads, the \n\"dirtyness\" follows you into the new head. If that isn't what you want, \nthen you need to add some logic like\n\n\tif [ \"$(git-diff-files)\" != \"\" ]; then\n\t\techo \"Current branch not clean\" >&2\n\t\texit 1\n\tfi\n\tgit checkout \"$@\"\n\nor something.\n\n\t\tLinus\n"}]}