git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.de>
To: git@vger.kernel.org
Cc: Martin Langhoff <martin@catalyst.net.nz>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Junio C Hamano <junkio@cox.net>,
	Frank Lichtenheld <frank@lichtenheld.de>
Subject: [PATCH] cvsserver: Fix handling of diappeared files on update
Date: Wed, 11 Apr 2007 22:38:19 +0200	[thread overview]
Message-ID: <11763238991005-git-send-email-frank@lichtenheld.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0704111158220.27922@iabervon.org>

Only send a modified response if the client sent a
"Modified" entry. This fixes the case where the
file was locally deleted on the client without
being removed from CVS. In this case the client
will only have sent the Entry for the file but nothing
else.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 git-cvsserver.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

 We really, really need a test suite for cvsserver...
 I've tested this as good for regressions as I could
 think of but am still unsure about it.

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 68aa752..25816c5 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -843,6 +843,7 @@ sub req_update
         if ( defined ( $wrev )
              and defined($meta->{revision})
              and $wrev == $meta->{revision}
+             and defined($state->{entries}{$filename}{modified_hash})
              and not exists ( $state->{opt}{C} ) )
         {
             $log->info("Tell the client the file is modified");
-- 
1.5.1

  parent reply	other threads:[~2007-04-11 20:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 16:10 cvsserver bug Daniel Barkalow
2007-04-11 19:43 ` Frank Lichtenheld
2007-04-11 20:38 ` Frank Lichtenheld [this message]
2007-04-11 21:09   ` [PATCH] cvsserver: Fix handling of diappeared files on update Junio C Hamano
2007-04-11 21:36   ` Junio C Hamano
2007-04-11 21:39     ` Daniel Barkalow
2007-04-11 21:42     ` Frank Lichtenheld
2007-04-11 21:52   ` Martin Langhoff
2007-04-11 22:02     ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11763238991005-git-send-email-frank@lichtenheld.de \
    --to=frank@lichtenheld.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=martin@catalyst.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).