* cvsserver bug
@ 2007-04-11 16:10 Daniel Barkalow
2007-04-11 19:43 ` Frank Lichtenheld
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
0 siblings, 2 replies; 9+ messages in thread
From: Daniel Barkalow @ 2007-04-11 16:10 UTC (permalink / raw)
To: git; +Cc: Martyn Smith, Martin Langhoff
It seems like git-cvsserver doesn't know the CVS special case that, if the
client has removed the file from the working directory (but not called
"cvs remove"), this means to revert it to the server's version. I think
that the condition around line 843 needs to exclude this case, and it
needs to get to line 892 instead, but I can't even fake perl to fix it.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: cvsserver bug
2007-04-11 16:10 cvsserver bug Daniel Barkalow
@ 2007-04-11 19:43 ` Frank Lichtenheld
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
1 sibling, 0 replies; 9+ messages in thread
From: Frank Lichtenheld @ 2007-04-11 19:43 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: git, Martyn Smith, Martin Langhoff
On Wed, Apr 11, 2007 at 12:10:24PM -0400, Daniel Barkalow wrote:
> It seems like git-cvsserver doesn't know the CVS special case that, if the
> client has removed the file from the working directory (but not called
> "cvs remove"), this means to revert it to the server's version. I think
> that the condition around line 843 needs to exclude this case, and it
> needs to get to line 892 instead, but I can't even fake perl to fix it.
I can confirm the bug. Will look into it a bit and see whether I can
come up with a fix.
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 16:10 cvsserver bug Daniel Barkalow
2007-04-11 19:43 ` Frank Lichtenheld
@ 2007-04-11 20:38 ` Frank Lichtenheld
2007-04-11 21:09 ` Junio C Hamano
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Frank Lichtenheld @ 2007-04-11 20:38 UTC (permalink / raw)
To: git; +Cc: Martin Langhoff, Daniel Barkalow, Junio C Hamano,
Frank Lichtenheld
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
@ 2007-04-11 21:09 ` Junio C Hamano
2007-04-11 21:36 ` Junio C Hamano
2007-04-11 21:52 ` Martin Langhoff
2 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2007-04-11 21:09 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: git, Martin Langhoff, Daniel Barkalow
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
2007-04-11 21:09 ` 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
2 siblings, 2 replies; 9+ messages in thread
From: Junio C Hamano @ 2007-04-11 21:36 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: git, Martin Langhoff, Daniel Barkalow
Frank Lichtenheld <frank@lichtenheld.de> writes:
> 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
This would make the modified response go away, but would it
cause a fresh re-checkout to happen?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 21:36 ` Junio C Hamano
@ 2007-04-11 21:39 ` Daniel Barkalow
2007-04-11 21:42 ` Frank Lichtenheld
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Barkalow @ 2007-04-11 21:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Frank Lichtenheld, git, Martin Langhoff
On Wed, 11 Apr 2007, Junio C Hamano wrote:
> Frank Lichtenheld <frank@lichtenheld.de> writes:
>
> > 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
>
> 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*
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 21:36 ` Junio C Hamano
2007-04-11 21:39 ` Daniel Barkalow
@ 2007-04-11 21:42 ` Frank Lichtenheld
1 sibling, 0 replies; 9+ messages in thread
From: Frank Lichtenheld @ 2007-04-11 21:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Martin Langhoff, Daniel Barkalow
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 <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
2007-04-11 21:09 ` Junio C Hamano
2007-04-11 21:36 ` Junio C Hamano
@ 2007-04-11 21:52 ` Martin Langhoff
2007-04-11 22:02 ` Daniel Barkalow
2 siblings, 1 reply; 9+ messages in thread
From: Martin Langhoff @ 2007-04-11 21:52 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: git, Daniel Barkalow, Junio C Hamano
Frank Lichtenheld wrote:
> 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>
Ack. With this, git-cvsserver matches cvs's behaviour. The only
difference is that cvs also spits out
E cvs update: warning: $path was lost
cheers,
martin
--
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224 UK: 0845 868 5733 ext 7224 MOB: +64(21)364-017
Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cvsserver: Fix handling of diappeared files on update
2007-04-11 21:52 ` Martin Langhoff
@ 2007-04-11 22:02 ` Daniel Barkalow
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Barkalow @ 2007-04-11 22:02 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Frank Lichtenheld, git, Junio C Hamano
On Thu, 12 Apr 2007, Martin Langhoff wrote:
> Frank Lichtenheld wrote:
> > 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>
>
> Ack. With this, git-cvsserver matches cvs's behaviour. The only
> difference is that cvs also spits out
>
> E cvs update: warning: $path was lost
My cvs client says:
cvs update: warning: $path unexpectedly disappeared
I'm not sure if something suitable is generated client-side in general,
but mine seems to.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-04-11 22:02 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-11 16:10 cvsserver bug Daniel Barkalow
2007-04-11 19:43 ` Frank Lichtenheld
2007-04-11 20:38 ` [PATCH] cvsserver: Fix handling of diappeared files on update Frank Lichtenheld
2007-04-11 21:09 ` 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
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).