{"thread":{"id":"21848","subject":"[PATCH] cvsserver: make the output of 'update' more compatible with cvs.","startedAt":"2009-12-03T20:12:47Z","lastAt":"2009-12-31T20:14:25Z","messageCount":8,"participants":["Sergei Organov","mmogilvi_git@miniinfo.net","Nanako Shiraishi","Junio C Hamano","Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129139","messageId":"87zl5z4y0w.fsf@osv.gnss.ru","threadId":"21848","inReplyTo":null,"subject":"[PATCH] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2009-12-03T20:12:47Z","receivedAt":"2009-12-03T20:12:47Z","isPatch":true,"sender":{"key":"osv@javad.com","avatar":null},"body":"Native cvs update outputs the string \"cvs update: Updating <DIR>\" for\nevery directory it processes (to stderr). This is used, e.g., by emacs\npcl-cvs to split files by directory. This commit implements this\nfeature in cvsserver.\n---\n git-cvsserver.perl |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 6dc45f5..5994951 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -981,10 +981,22 @@ sub req_update\n \n     #$log->debug(\"update state : \" . Dumper($state));\n \n+    my $last_dirname = \"///\";\n+    \n     # foreach file specified on the command line ...\n     foreach my $filename ( @{$state->{args}} )\n     {\n         $filename = filecleanup($filename);\n+        my $cur_dirname = dirname($filename);\n+        if ( $cur_dirname ne $last_dirname )\n+        {\n+            $last_dirname = $cur_dirname;\n+            if ( $cur_dirname eq \"\" )\n+            {\n+                $cur_dirname = \".\";\n+            }\n+            print \"E cvs update: Updating $cur_dirname\\n\";\n+        }\n \n         $log->debug(\"Processing file $filename\");\n \n-- \n1.6.6.rc0.67.g68b144.dirty\n"},{"id":"129303","messageId":"20091205234831.GA925@comcast.net","threadId":"21848","inReplyTo":"87zl5z4y0w.fsf@osv.gnss.ru","subject":"Re: [PATCH] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"","fromEmail":"mmogilvi_git@miniinfo.net","sentAt":"2009-12-05T23:48:31Z","receivedAt":"2009-12-05T23:48:31Z","isPatch":true,"sender":{"key":"mmogilvi_git@miniinfo.net","avatar":null},"body":"On Thu, Dec 03, 2009 at 11:12:47PM +0300, Sergei Organov wrote:\n>  \n> +    my $last_dirname = \"///\";\n> +    \n>      # foreach file specified on the command line ...\n>      foreach my $filename ( @{$state->{args}} )\n>      {\n>          $filename = filecleanup($filename);\n> +        my $cur_dirname = dirname($filename);\n> +        if ( $cur_dirname ne $last_dirname )\n> +        {\n> +            $last_dirname = $cur_dirname;\n> +            if ( $cur_dirname eq \"\" )\n> +            {\n> +                $cur_dirname = \".\";\n> +            }\n> +            print \"E cvs update: Updating $cur_dirname\\n\";\n> +        }\n>  \n>          $log->debug(\"Processing file $filename\");\n\nThis should probably be conditional on the absense of the\nglobal \"cvs -q update\" and \"cvs -Q update\" options, in case\nother CVS clients depend on quiet operation when they specify\nthose options.\n\n--\nMatthew Ogilvie   [mmogilvi_git@miniinfo.net]\n"},{"id":"129389","messageId":"87ocmbdw8i.fsf@osv.gnss.ru","threadId":"21848","inReplyTo":"20091205234831.GA925@comcast.net","subject":"Re: [PATCH] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2009-12-07T08:27:57Z","receivedAt":"2009-12-07T08:27:57Z","isPatch":true,"sender":{"key":"osv@javad.com","avatar":null},"body":"mmogilvi_git@miniinfo.net writes:\n\n> On Thu, Dec 03, 2009 at 11:12:47PM +0300, Sergei Organov wrote:\n>>  \n>> +    my $last_dirname = \"///\";\n>> +    \n>>      # foreach file specified on the command line ...\n>>      foreach my $filename ( @{$state->{args}} )\n>>      {\n>>          $filename = filecleanup($filename);\n>> +        my $cur_dirname = dirname($filename);\n>> +        if ( $cur_dirname ne $last_dirname )\n>> +        {\n>> +            $last_dirname = $cur_dirname;\n>> +            if ( $cur_dirname eq \"\" )\n>> +            {\n>> +                $cur_dirname = \".\";\n>> +            }\n>> +            print \"E cvs update: Updating $cur_dirname\\n\";\n>> +        }\n>>  \n>>          $log->debug(\"Processing file $filename\");\n>\n> This should probably be conditional on the absense of the\n> global \"cvs -q update\" and \"cvs -Q update\" options, in case\n> other CVS clients depend on quiet operation when they specify\n> those options.\n\nGood catch, thanks! I'll redo the patch.\n\n-- Sergei.\n"},{"id":"129400","messageId":"87bpibdonj.fsf@osv.gnss.ru","threadId":"21848","inReplyTo":"87zl5z4y0w.fsf@osv.gnss.ru","subject":"[PATCH v2] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2009-12-07T11:11:44Z","receivedAt":"2009-12-07T11:11:44Z","isPatch":true,"sender":{"key":"osv@javad.com","avatar":null},"body":"Native cvs update outputs the string \"cvs update: Updating <DIR>\" for\nevery directory it processes (to stderr) unless -q or -Q is given on\ncomman-line. This is used, e.g., by emacs pcl-cvs to split files by\ndirectory. This commit implements this feature in cvsserver.\n\nSigned-off-by: Sergei Organov <osv@javad.com>\n---\n git-cvsserver.perl |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 6dc45f5..f4c75bb 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -981,6 +981,8 @@ sub req_update\n \n     #$log->debug(\"update state : \" . Dumper($state));\n \n+    my $last_dirname = \"///\";\n+    \n     # foreach file specified on the command line ...\n     foreach my $filename ( @{$state->{args}} )\n     {\n@@ -988,6 +990,20 @@ sub req_update\n \n         $log->debug(\"Processing file $filename\");\n \n+        unless ( $state->{globaloptions}{-Q} || $state->{globaloptions}{-q} )\n+        {\n+            my $cur_dirname = dirname($filename);\n+            if ( $cur_dirname ne $last_dirname )\n+            {\n+                $last_dirname = $cur_dirname;\n+                if ( $cur_dirname eq \"\" )\n+                {\n+                    $cur_dirname = \".\";\n+                }\n+                print \"E cvs update: Updating $cur_dirname\\n\";\n+            }\n+        }\n+\n         # if we have a -C we should pretend we never saw modified stuff\n         if ( exists ( $state->{opt}{C} ) )\n         {\n-- \n1.6.6.rc0.67.gc0456.dirty\n"},{"id":"130548","messageId":"20091230224115.6117@nanako3.lavabit.com","threadId":"21848","inReplyTo":"87bpibdonj.fsf@osv.gnss.ru","subject":"Re: [PATCH v2] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-12-30T13:41:15Z","receivedAt":"2009-12-30T13:41:15Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Junio, could you tell us what happened to this thread?\n"},{"id":"130590","messageId":"7vfx6rzlkg.fsf@alter.siamese.dyndns.org","threadId":"21848","inReplyTo":"20091230224115.6117@nanako3.lavabit.com","subject":"Re: [PATCH v2] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-31T06:47:43Z","receivedAt":"2009-12-31T06:47:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Junio, could you tell us what happened to this thread?\n\nWell, since I don't use cvsserver myself, but this v2 was done with\nimprovements based on some review suggestions, I was waiting for a\nresponse or two from people who know better and care more about cvs server\nemulation than me, which unfortunately didn't happen.\n\nThanks for reminding; I can queue it to 'pu' or perhaps 'next' and see if\nanybody screams by getting hit by an unintended side effects.\n"},{"id":"130611","messageId":"46a038f90912310720l4b1cbdebs2b85774ae7e33c0e@mail.gmail.com","threadId":"21848","inReplyTo":"7vfx6rzlkg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-12-31T15:20:26Z","receivedAt":"2009-12-31T15:20:26Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Thu, Dec 31, 2009 at 7:47 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Well, since I don't use cvsserver myself, but this v2 was done with\n> improvements based on some review suggestions, I was waiting for a\n> response or two from people who know better and care more about cvs server\n> emulation than me, which unfortunately didn't happen.\n\nLooks good to me -- good to get it into pu. While I continue to use\ngit extensively, I don't use cvsserver anymore, nor work with people\nthat do. Might have reason to revisit cvsserver in the near future\nthough, to help Moodle transition to git.\n\nThat transition will bring a few top-posters and Eclipse lovers to the\nlist. Looking past such details, they are fine people who may need a\nlittle bit of git-newbie help ;-)\n\nhappy new year,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"130629","messageId":"7vd41uucim.fsf@alter.siamese.dyndns.org","threadId":"21848","inReplyTo":"46a038f90912310720l4b1cbdebs2b85774ae7e33c0e@mail.gmail.com","subject":"Re: [PATCH v2] cvsserver: make the output of 'update' more compatible with cvs.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-31T20:14:25Z","receivedAt":"2009-12-31T20:14:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Langhoff <martin.langhoff@gmail.com> writes:\n\n> On Thu, Dec 31, 2009 at 7:47 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Well, since I don't use cvsserver myself, but this v2 was done with\n>> improvements based on some review suggestions, I was waiting for a\n>> response or two from people who know better and care more about cvs server\n>> emulation than me, which unfortunately didn't happen.\n>\n> Looks good to me -- good to get it into pu. While I continue to use\n> git extensively, I don't use cvsserver anymore, nor work with people\n> that do. Might have reason to revisit cvsserver in the near future\n> though, to help Moodle transition to git.\n>\n> That transition will bring a few top-posters and Eclipse lovers to the\n> list. Looking past such details, they are fine people who may need a\n> little bit of git-newbie help ;-)\n>\n> happy new year,\n\nHappy new year to you, Nana and Sergei, but not yet in my timezone ;-)\n\nThanks; I'll forge/add your \"Acked-by:\" when I queue it.\n"}]}