Frank Lichtenheld [off-list ref] writes:
quoted hunk
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 <redacted>
---
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
This would make the modified response go away, but would it
cause a fresh re-checkout to happen?
On Wed, 11 Apr 2007, Junio C Hamano wrote:
Frank Lichtenheld [off-list ref] writes:
quoted
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 <redacted>
---
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
This would make the modified response go away, but would it
cause a fresh re-checkout to happen?
It falls through into the appropriate case, evidently. At least, it seems
to resolve my issue.
-Daniel
*This .sig left intentionally blank*
On Wed, Apr 11, 2007 at 02:36:10PM -0700, Junio C Hamano wrote:
This would make the modified response go away, but would it
cause a fresh re-checkout to happen?
Yeah, the rest of the code handles this case correctly if
it actually gets the chance to do so.
Gruesse,
--
Frank Lichtenheld [off-list ref]
www: http://www.djpig.de/