@matheusbsbs / matheus-bagliano / commits / 7172aabb4b
Fork 0

cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U

A few things to satisfy Eclipse's strange habits as a cvs client: - Implement Questionable - Aliased rlog to log, but more work may be needed - Add a space after the U that indicates updated

Martin Langhoff committed Mar 1, 2006 at 19:30 UTC 7172aabb4b5a6d0345b3c57f2f7ededece81b9b7
1 file changed +21 -3
git-cvsserver.perl
+21 -3
@@ -53,6 +53,7 @@ my $methods = {
53 'Entry' => \&req_Entry,
54 'Modified' => \&req_Modified,
55 'Unchanged' => \&req_Unchanged,
56 + 'Questionable' => \&req_Questionable,
57 'Argument' => \&req_Argument,
58 'Argumentx' => \&req_Argument,
59 'expand-modules' => \&req_expandmodules,
@@ -63,6 +64,7 @@ my $methods = {
64 'ci' => \&req_ci,
65 'diff' => \&req_diff,
66 'log' => \&req_log,
67 + 'rlog' => \&req_log,
68 'tag' => \&req_CATCHALL,
69 'status' => \&req_status,
70 'admin' => \&req_CATCHALL,
@@ -459,6 +461,22 @@ sub req_Unchanged
461 #$log->debug("req_Unchanged : $data");
462 }
463
464 +# Questionable filename \n
465 +# Response expected: no. Additional data: no.
466 +# Tell the server to check whether filename should be ignored,
467 +# and if not, next time the server sends responses, send (in
468 +# a M response) `?' followed by the directory and filename.
469 +# filename must not contain `/'; it needs to be a file in the
470 +# directory named by the most recent Directory request.
471 +sub req_Questionable
472 +{
473 + my ( $cmd, $data ) = @_;
474 +
475 + $state->{entries}{$state->{directory}.$data}{questionable} = 1;
476 +
477 + #$log->debug("req_Questionable : $data");
478 +}
479 +
480 # Argument text \n
481 # Response expected: no. Save argument for use in a subsequent command.
482 # Arguments accumulate until an argument-using command is given, at which
@@ -568,7 +586,7 @@ sub req_co
586
587 # print some information to the client
588 print "MT +updated\n";
571 - print "MT text U\n";
589 + print "MT text U \n";
590 if ( defined ( $git->{dir} ) and $git->{dir} ne "./" )
591 {
592 print "MT fname $checkout_path/$git->{dir}$git->{name}\n";
@@ -579,9 +597,9 @@ sub req_co
597 print "MT -updated\n";
598
599 # instruct client we're sending a file to put in this path
582 - print "Created $checkout_path/" . ( defined ( $git->{dir} ) ? $git->{dir} . "/" : "" ) . "\n";
600 + print "Created $checkout_path/" . ( defined ( $git->{dir} ) and $git->{dir} ne "./" ? $git->{dir} . "/" : "" ) . "\n";
601
584 - print $state->{CVSROOT} . "/$module/" . ( defined ( $git->{dir} ) ? $git->{dir} . "/" : "" ) . "$git->{name}\n";
602 + print $state->{CVSROOT} . "/$module/" . ( defined ( $git->{dir} ) and $git->{dir} ne "./" ? $git->{dir} . "/" : "" ) . "$git->{name}\n";
603
604 # this is an "entries" line
605 print "/$git->{name}/1.$git->{revision}///\n";