{"thread":{"id":"4612","subject":"Tracking CVS","startedAt":"2006-06-22T12:41:16Z","lastAt":"2006-07-19T12:38:09Z","messageCount":11,"participants":["Jon Smirl","Petr Baudis","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22261","messageId":"9e4733910606220541y15d66fa6t33ab0c80ae05f764@mail.gmail.com","threadId":"4612","inReplyTo":null,"subject":"Tracking CVS","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-06-22T12:41:16Z","receivedAt":"2006-06-22T12:41:16Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I'm tracking cvs using this sequence.\n\ncvs update\ncg rm -a\ncg commit\ncg add -r .\ncg commit\n\nIs there a way to avoid the two commits? If you do the add with out\nthe intervening commit it just adds the files back.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"22277","messageId":"20060622135831.GB21864@pasky.or.cz","threadId":"4612","inReplyTo":"9e4733910606220541y15d66fa6t33ab0c80ae05f764@mail.gmail.com","subject":"Re: Tracking CVS","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-06-22T13:58:31Z","receivedAt":"2006-06-22T13:58:31Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter\nwhere Jon Smirl <jonsmirl@gmail.com> said that...\n> I'm tracking cvs using this sequence.\n> \n> cvs update\n> cg rm -a\n> cg commit\n> cg add -r .\n> cg commit\n> \n> Is there a way to avoid the two commits? If you do the add with out\n> the intervening commit it just adds the files back.\n\nI think the most straightforward way is:\n\n\tcvs update\n\tcg-rm -a\n\tcg-status -wns \\? | xargs cg-add\n\tcg-commit\n\nIf you want to be careful about filenames polluted by non-newline\nwhitespaces,\n\n\tcg-status -wns \\? | tr '\\n' '\\0' | xargs -0 cg-add\n\nIf you want to be safe even with filenames containing newlines, you need\nto go at the Git level:\n\n\tgit-ls-files -z --others | \\\n\t\txargs -0 git-update-index --add --\n\nPerhaps we might make a special command which would sync the index set\nwith the working copy set...\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nA person is just about as big as the things that make them angry.\n"},{"id":"22279","messageId":"9e4733910606220717of2ba299ta8a38c7d63fd5635@mail.gmail.com","threadId":"4612","inReplyTo":"20060622135831.GB21864@pasky.or.cz","subject":"Re: Tracking CVS","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-06-22T14:17:15Z","receivedAt":"2006-06-22T14:17:15Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:\n> Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter\n> where Jon Smirl <jonsmirl@gmail.com> said that...\n> > I'm tracking cvs using this sequence.\n> >\n> > cvs update\n> > cg rm -a\n> > cg commit\n> > cg add -r .\n> > cg commit\n> >\n> > Is there a way to avoid the two commits? If you do the add with out\n> > the intervening commit it just adds the files back.\n>\n> I think the most straightforward way is:\n>\n>         cvs update\n>         cg-rm -a\n>         cg-status -wns \\? | xargs cg-add\n>         cg-commit\n>\n> If you want to be careful about filenames polluted by non-newline\n> whitespaces,\n>\n>         cg-status -wns \\? | tr '\\n' '\\0' | xargs -0 cg-add\n>\n> If you want to be safe even with filenames containing newlines, you need\n> to go at the Git level:\n>\n>         git-ls-files -z --others | \\\n>                 xargs -0 git-update-index --add --\n>\n> Perhaps we might make a special command which would sync the index set\n> with the working copy set...\n\nHow about a cg-sync? Tracking cvs (or other SCM) with git is probably\na common activitiy while you try to convince the other CVS users to\nswitch. It is probably worth a little write up in the readme on the\nbest way to do it.\n\ncg-sync should probably default to having a prompt before actually\nadding/removing the files. Add a -f or something to get rid of the\nprompt.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"22283","messageId":"7vveqtp1dl.fsf@assigned-by-dhcp.cox.net","threadId":"4612","inReplyTo":"20060622135831.GB21864@pasky.or.cz","subject":"Re: Tracking CVS","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-22T17:05:10Z","receivedAt":"2006-06-22T17:05:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> If you want to be safe even with filenames containing newlines, you need\n> to go at the Git level:\n>\n> \tgit-ls-files -z --others | \\\n> \t\txargs -0 git-update-index --add --\n\nIf you want to avoid \"xargs -0\", you can replace it with\n\"git-update-index -z --stdin\" I think.\n\n> Perhaps we might make a special command which would sync the index set\n> with the working copy set...\n\nI think that makes sense.  Something like what \"git-commit -a\"\ndoes before making a commit.\n"},{"id":"22285","messageId":"e7ej5o$1p6$1@sea.gmane.org","threadId":"4612","inReplyTo":"7vveqtp1dl.fsf@assigned-by-dhcp.cox.net","subject":"Re: Tracking CVS","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-22T17:14:33Z","receivedAt":"2006-06-22T17:14:33Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Petr Baudis <pasky@suse.cz> writes:\n \n>> Perhaps we might make a special command which would sync the index set\n>> with the working copy set...\n> \n> I think that makes sense.  Something like what \"git-commit -a\"\n> does before making a commit.\n\nIsn't that what \"git update-index --again\" does? \n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"22286","messageId":"7virmtozld.fsf@assigned-by-dhcp.cox.net","threadId":"4612","inReplyTo":"e7ej5o$1p6$1@sea.gmane.org","subject":"Re: Tracking CVS","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-22T17:43:42Z","receivedAt":"2006-06-22T17:43:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>\n>> Petr Baudis <pasky@suse.cz> writes:\n>  \n>>> Perhaps we might make a special command which would sync the index set\n>>> with the working copy set...\n>> \n>> I think that makes sense.  Something like what \"git-commit -a\"\n>> does before making a commit.\n>\n> Isn't that what \"git update-index --again\" does? \n\nNo.\n"},{"id":"22327","messageId":"9e4733910606221918r775f49f0l4929f4703281115f@mail.gmail.com","threadId":"4612","inReplyTo":"20060622135831.GB21864@pasky.or.cz","subject":"Re: Tracking CVS","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-06-23T02:18:32Z","receivedAt":"2006-06-23T02:18:32Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:\n> Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter\n> where Jon Smirl <jonsmirl@gmail.com> said that...\n> > I'm tracking cvs using this sequence.\n> >\n> > cvs update\n> > cg rm -a\n> > cg commit\n> > cg add -r .\n> > cg commit\n> >\n> > Is there a way to avoid the two commits? If you do the add with out\n> > the intervening commit it just adds the files back.\n>\n> I think the most straightforward way is:\n>\n>         cvs update\n>         cg-rm -a\n>         cg-status -wns \\? | xargs cg-add\n>         cg-commit\n\nThis doesn't pick up new directories with recursion.\n\n>\n> If you want to be careful about filenames polluted by non-newline\n> whitespaces,\n>\n>         cg-status -wns \\? | tr '\\n' '\\0' | xargs -0 cg-add\n>\n> If you want to be safe even with filenames containing newlines, you need\n> to go at the Git level:\n>\n>         git-ls-files -z --others | \\\n>                 xargs -0 git-update-index --add --\n>\n> Perhaps we might make a special command which would sync the index set\n> with the working copy set...\n>\n> --\n>                                 Petr \"Pasky\" Baudis\n> Stuff: http://pasky.or.cz/\n> A person is just about as big as the things that make them angry.\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"22328","messageId":"9e4733910606221924v69d71e59y8246925ad92aeba3@mail.gmail.com","threadId":"4612","inReplyTo":"9e4733910606221918r775f49f0l4929f4703281115f@mail.gmail.com","subject":"Re: Tracking CVS","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-06-23T02:24:16Z","receivedAt":"2006-06-23T02:24:16Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 6/22/06, Jon Smirl <jonsmirl@gmail.com> wrote:\n> > I think the most straightforward way is:\n> >\n> >         cvs update\n> >         cg-rm -a\n> >         cg-status -wns \\? | xargs cg-add\n> >         cg-commit\n>\n> This doesn't pick up new directories with recursion.\n\nThe new directories that came down were empty.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"22329","messageId":"20060623023131.GK21864@pasky.or.cz","threadId":"4612","inReplyTo":"9e4733910606221918r775f49f0l4929f4703281115f@mail.gmail.com","subject":"Re: Tracking CVS","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-06-23T02:31:31Z","receivedAt":"2006-06-23T02:31:31Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Jun 23, 2006 at 04:18:32AM CEST, I got a letter\nwhere Jon Smirl <jonsmirl@gmail.com> said that...\n> On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:\n> >        cvs update\n> >        cg-rm -a\n> >        cg-status -wns \\? | xargs cg-add\n> >        cg-commit\n> \n> This doesn't pick up new directories with recursion.\n\nAh. Either pass -S to cg-status or -r to cg-add.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nA person is just about as big as the things that make them angry.\n"},{"id":"22369","messageId":"9e4733910606231114g5d16b05k21069c628f9ea9ca@mail.gmail.com","threadId":"4612","inReplyTo":"20060623023131.GK21864@pasky.or.cz","subject":"Re: Tracking CVS","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-06-23T18:14:58Z","receivedAt":"2006-06-23T18:14:58Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"My cg-sync script looks like this now:\n\n#!/usr/bin/env bash\ncg-rm -a\ncg-status -wnSs \\? | xargs cg-add\n\nBut when are no files to add or remove I get this:\n\n[jonsmirl@jonsmirl mozilla]$ cg sync\ncg-rm: no files to remove\ncg-add: usage: cg-add [-N] [-r] FILE...\n\nThis is definitely a useful script for tracking CVS. I'd like to see\nit added to cogito once it is fully debugged.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"23928","messageId":"20060719123808.GH13776@pasky.or.cz","threadId":"4612","inReplyTo":"9e4733910606220717of2ba299ta8a38c7d63fd5635@mail.gmail.com","subject":"Re: Tracking CVS","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-07-19T12:38:09Z","receivedAt":"2006-07-19T12:38:09Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Jun 22, 2006 at 04:17:15PM CEST, I got a letter\nwhere Jon Smirl <jonsmirl@gmail.com> said that...\n> On 6/22/06, Petr Baudis <pasky@suse.cz> wrote:\n> >Dear diary, on Thu, Jun 22, 2006 at 02:41:16PM CEST, I got a letter\n> >where Jon Smirl <jonsmirl@gmail.com> said that...\n> >> I'm tracking cvs using this sequence.\n> >>\n> >> cvs update\n> >> cg rm -a\n> >> cg commit\n> >> cg add -r .\n> >> cg commit\n> >>\n> >> Is there a way to avoid the two commits? If you do the add with out\n> >> the intervening commit it just adds the files back.\n> \n> How about a cg-sync? Tracking cvs (or other SCM) with git is probably\n> a common activitiy while you try to convince the other CVS users to\n> switch. It is probably worth a little write up in the readme on the\n> best way to do it.\n\nI have added and pushed out support for cg-add -a, now it should be\nmerely a matter of\n\n\tcg-rm -a && cg-add -a\n\nand I have documented that.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nSnow falling on Perl. White noise covering line noise.\nHides all the bugs too. -- J. Putnam\n"}]}