{"thread":{"id":"7609","subject":"cvsserver bug","startedAt":"2007-04-11T16:10:24Z","lastAt":"2007-04-11T22:02:14Z","messageCount":9,"participants":["Daniel Barkalow","Frank Lichtenheld","Junio C Hamano","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"39122","messageId":"Pine.LNX.4.64.0704111158220.27922@iabervon.org","threadId":"7609","inReplyTo":null,"subject":"cvsserver bug","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2007-04-11T16:10:24Z","receivedAt":"2007-04-11T16:10:24Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"It seems like git-cvsserver doesn't know the CVS special case that, if the \nclient has removed the file from the working directory (but not called \n\"cvs remove\"), this means to revert it to the server's version. I think \nthat the condition around line 843 needs to exclude this case, and it \nneeds to get to line 892 instead, but I can't even fake perl to fix it.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"39129","messageId":"20070411194327.GA7085@planck.djpig.de","threadId":"7609","inReplyTo":"Pine.LNX.4.64.0704111158220.27922@iabervon.org","subject":"Re: cvsserver bug","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-11T19:43:27Z","receivedAt":"2007-04-11T19:43:27Z","isPatch":false,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Wed, Apr 11, 2007 at 12:10:24PM -0400, Daniel Barkalow wrote:\n> It seems like git-cvsserver doesn't know the CVS special case that, if the \n> client has removed the file from the working directory (but not called \n> \"cvs remove\"), this means to revert it to the server's version. I think \n> that the condition around line 843 needs to exclude this case, and it \n> needs to get to line 892 instead, but I can't even fake perl to fix it.\n\nI can confirm the bug. Will look into it a bit and see whether I can\ncome up with a fix.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"39132","messageId":"11763238991005-git-send-email-frank@lichtenheld.de","threadId":"7609","inReplyTo":"Pine.LNX.4.64.0704111158220.27922@iabervon.org","subject":"[PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-11T20:38:19Z","receivedAt":"2007-04-11T20:38:19Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Only send a modified response if the client sent a\n\"Modified\" entry. This fixes the case where the\nfile was locally deleted on the client without\nbeing removed from CVS. In this case the client\nwill only have sent the Entry for the file but nothing\nelse.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n We really, really need a test suite for cvsserver...\n I've tested this as good for regressions as I could\n think of but am still unsure about it.\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 68aa752..25816c5 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -843,6 +843,7 @@ sub req_update\n         if ( defined ( $wrev )\n              and defined($meta->{revision})\n              and $wrev == $meta->{revision}\n+             and defined($state->{entries}{$filename}{modified_hash})\n              and not exists ( $state->{opt}{C} ) )\n         {\n             $log->info(\"Tell the client the file is modified\");\n-- \n1.5.1\n"},{"id":"39135","messageId":"7v6482obxi.fsf@assigned-by-dhcp.cox.net","threadId":"7609","inReplyTo":"11763238991005-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-11T21:09:45Z","receivedAt":"2007-04-11T21:09:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"},{"id":"39136","messageId":"7v1wiqoaph.fsf@assigned-by-dhcp.cox.net","threadId":"7609","inReplyTo":"11763238991005-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-11T21:36:10Z","receivedAt":"2007-04-11T21:36:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> Only send a modified response if the client sent a\n> \"Modified\" entry. This fixes the case where the\n> file was locally deleted on the client without\n> being removed from CVS. In this case the client\n> will only have sent the Entry for the file but nothing\n> else.\n>\n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> ---\n>  git-cvsserver.perl |    1 +\n>  1 files changed, 1 insertions(+), 0 deletions(-)\n>\n>  We really, really need a test suite for cvsserver...\n>  I've tested this as good for regressions as I could\n>  think of but am still unsure about it.\n>\n> diff --git a/git-cvsserver.perl b/git-cvsserver.perl\n> index 68aa752..25816c5 100755\n> --- a/git-cvsserver.perl\n> +++ b/git-cvsserver.perl\n> @@ -843,6 +843,7 @@ sub req_update\n>          if ( defined ( $wrev )\n>               and defined($meta->{revision})\n>               and $wrev == $meta->{revision}\n> +             and defined($state->{entries}{$filename}{modified_hash})\n>               and not exists ( $state->{opt}{C} ) )\n>          {\n>              $log->info(\"Tell the client the file is modified\");\n> -- \n> 1.5.1\n\nThis would make the modified response go away, but would it\ncause a fresh re-checkout to happen?\n"},{"id":"39138","messageId":"Pine.LNX.4.64.0704111737180.27922@iabervon.org","threadId":"7609","inReplyTo":"7v1wiqoaph.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2007-04-11T21:39:24Z","receivedAt":"2007-04-11T21:39:24Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 11 Apr 2007, Junio C Hamano wrote:\n\n> Frank Lichtenheld <frank@lichtenheld.de> writes:\n> \n> > Only send a modified response if the client sent a\n> > \"Modified\" entry. This fixes the case where the\n> > file was locally deleted on the client without\n> > being removed from CVS. In this case the client\n> > will only have sent the Entry for the file but nothing\n> > else.\n> >\n> > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> > ---\n> >  git-cvsserver.perl |    1 +\n> >  1 files changed, 1 insertions(+), 0 deletions(-)\n> >\n> >  We really, really need a test suite for cvsserver...\n> >  I've tested this as good for regressions as I could\n> >  think of but am still unsure about it.\n> >\n> > diff --git a/git-cvsserver.perl b/git-cvsserver.perl\n> > index 68aa752..25816c5 100755\n> > --- a/git-cvsserver.perl\n> > +++ b/git-cvsserver.perl\n> > @@ -843,6 +843,7 @@ sub req_update\n> >          if ( defined ( $wrev )\n> >               and defined($meta->{revision})\n> >               and $wrev == $meta->{revision}\n> > +             and defined($state->{entries}{$filename}{modified_hash})\n> >               and not exists ( $state->{opt}{C} ) )\n> >          {\n> >              $log->info(\"Tell the client the file is modified\");\n> > -- \n> > 1.5.1\n> \n> This would make the modified response go away, but would it\n> cause a fresh re-checkout to happen?\n\nIt falls through into the appropriate case, evidently. At least, it seems \nto resolve my issue.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"39139","messageId":"20070411214231.GB7085@planck.djpig.de","threadId":"7609","inReplyTo":"7v1wiqoaph.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-11T21:42:31Z","receivedAt":"2007-04-11T21:42:31Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Wed, Apr 11, 2007 at 02:36:10PM -0700, Junio C Hamano wrote:\n> This would make the modified response go away, but would it\n> cause a fresh re-checkout to happen?\n\nYeah, the rest of the code handles this case correctly if\nit actually gets the chance to do so.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"39142","messageId":"461D5890.1000605@catalyst.net.nz","threadId":"7609","inReplyTo":"11763238991005-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2007-04-11T21:52:16Z","receivedAt":"2007-04-11T21:52:16Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"Frank Lichtenheld wrote:\n> Only send a modified response if the client sent a\n> \"Modified\" entry. This fixes the case where the\n> file was locally deleted on the client without\n> being removed from CVS. In this case the client\n> will only have sent the Entry for the file but nothing\n> else.\n> \n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n\nAck. With this, git-cvsserver matches cvs's behaviour. The only\ndifference is that cvs also spits out\n\n  E cvs update: warning: $path was lost\n\ncheers,\n\n\nmartin\n-- \n-----------------------------------------------------------------------\nMartin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington\nWEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St\nOFFICE: +64(4)916-7224  UK: 0845 868 5733 ext 7224  MOB: +64(21)364-017\n      Make things as simple as possible, but no simpler - Einstein\n-----------------------------------------------------------------------\n"},{"id":"39143","messageId":"Pine.LNX.4.64.0704111755120.27922@iabervon.org","threadId":"7609","inReplyTo":"461D5890.1000605@catalyst.net.nz","subject":"Re: [PATCH] cvsserver: Fix handling of diappeared files on update","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2007-04-11T22:02:14Z","receivedAt":"2007-04-11T22:02:14Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Thu, 12 Apr 2007, Martin Langhoff wrote:\n\n> Frank Lichtenheld wrote:\n> > Only send a modified response if the client sent a\n> > \"Modified\" entry. This fixes the case where the\n> > file was locally deleted on the client without\n> > being removed from CVS. In this case the client\n> > will only have sent the Entry for the file but nothing\n> > else.\n> > \n> > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> \n> Ack. With this, git-cvsserver matches cvs's behaviour. The only\n> difference is that cvs also spits out\n> \n>   E cvs update: warning: $path was lost\n\nMy cvs client says:\n\ncvs update: warning: $path unexpectedly disappeared\n\nI'm not sure if something suitable is generated client-side in general, \nbut mine seems to.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}