threads / discuss / 4031

Problem using GIT CVS-server

Subject: Problem using GIT CVS-server

## tl;dr

13 messages between May 3, 2006 and May 3, 2006.

replies: 12people: 4as markdown or json

Panagiotis Issaris· May 3, 2006, 08:11 UTC · lore
Hi,

I've tried using git-cvsserver, but keep running into problems: When doing a checkout, it only checks out a small subset of the total amount of files in the repository and reports a warning/error. When doing a subsequent update, it doesn't seem to do anything, but reports two error messages/warnings.

I'm using yesterdays GIT and try to serve my local copy of the GIT repository using git-cvsserver.

export CVSROOT=:ext:takis@localhost:/usr/local/src/git/.git export CVS_SERVER=git-cvsserver

takis@issaris:/tmp/a/b$ cvs co -d project-master master takis@localhost's password: cvs checkout: Updating project-master U project-master/Makefile U project-master/README U project-master/cache.h U project-master/cat-file.c U project-master/commit-tree.c U project-master/init-db.c U project-master/read-cache.c U project-master/read-tree.c U project-master/show-diff.c U project-master/update-cache.c U project-master/write-tree.c closing dbh with active statement handles takis@issaris:/tmp/a/b$ cd project-master/ takis@issaris:/tmp/a/b/project-master$ cvs -z3 update -PAd takis@localhost's password: server doesn't support gzip-file-contents closing dbh with active statement handles takis@issaris:/tmp/a/b/project-master$

With friendly regards, Takis

Andreas Ericsson· May 3, 2006, 08:17 UTC · re: Panagiotis Issaris · lore

Re: Problem using GIT CVS-server

Panagiotis Issaris wrote:
Show 8 quoted lines
> Hi,
> 
> I've tried using git-cvsserver, but keep running into problems:
> When doing a checkout, it only checks out a small subset of
> the total amount of files in the repository and reports a warning/error.
> When doing a subsequent update, it doesn't seem to do anything,
> but reports two error messages/warnings.
> 
...
> takis@issaris:/tmp/a/b$ cd project-master/
> takis@issaris:/tmp/a/b/project-master$ cvs -z3 update -PAd
> takis@localhost's password:
> server doesn't support gzip-file-contents
Drop -z3 from command-line. git-cvsserver has no compression support.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Panagiotis Issaris· May 3, 2006, 08:26 UTC · re: Andreas Ericsson · lore

Re: Problem using GIT CVS-server

Hi,
Andreas Ericsson wrote:
> [...]
>
> Drop -z3 from command-line. git-cvsserver has no compression support.
Thanks!

Ahum, painful. That should have been obvious :), but I'm kinda programmed to use "-z3 -PAd" whenever I do a cvs update. I didn't even notice the z3 in my own typing :->

Without the z3, it gives the same error/warning as on checkout: takis@issaris:/tmp/a/b/project-master$ cvs update -PAd takis@localhost's password: closing dbh with active statement handles takis@issaris:/tmp/a/b/project-master$

With friendly regards, Takis

Andreas Ericsson· May 3, 2006, 08:44 UTC · re: Panagiotis Issaris · lore

Re: Problem using GIT CVS-server

Panagiotis Issaris wrote:
Show 23 quoted lines
> Hi,
> 
> Andreas Ericsson wrote:
> 
>> [...]
>>
>> Drop -z3 from command-line. git-cvsserver has no compression support.
> 
> 
> Thanks!
> 
> Ahum, painful. That should have been obvious :), but I'm kinda programmed
> to use "-z3 -PAd" whenever I do a cvs update. I didn't even notice the 
> z3 in
> my own typing :->
> 
> 
> Without the z3, it gives the same error/warning as on checkout:
> takis@issaris:/tmp/a/b/project-master$ cvs update -PAd
> takis@localhost's password:
> closing dbh with active statement handles
> takis@issaris:/tmp/a/b/project-master$
> 

That error message comes from your client. I have no idea why, and now that I'm a git fanatic I'll stay blissfully ignorant of CVS' internal workings. Martyn and Martin (the dynamic duo that wrote the cvsserver thingie) might be able to tell you more.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Martin Langhoff· May 3, 2006, 10:11 UTC · re: Panagiotis Issaris · lore

Re: Problem using GIT CVS-server

On 5/3/06, Panagiotis Issaris <takis@lumumba.uhasselt.be> wrote:
> I've tried using git-cvsserver, but keep running into problems:
Panagiotis,

thanks a lot for the feedback! cvsserver has mainly been tried/debugged with a few repositories, mainly the moodle.git repository that we host, which is an import from a CVS repo.

> When doing a checkout, it only checks out a small subset of
> the total amount of files in the repository and reports a warning/error.
Hmmm. 100% reproduceable -- looking at it now.
> When doing a subsequent update, it doesn't seem to do anything,
> but reports two error messages/warnings.
...
> closing dbh with active statement handles

I thought we had gotten rid of those. In any case, I don't see that error, and it's just a silly warning from DBI, as we are using cached statements. As it happens when cvsserver is shutting down, it doesn't actually break the protocol.

> server doesn't support gzip-file-contents

That warning is harmless, and always there. I did look once at implementing gzip compression, but in some cases it implies creating extra temp files to calculate the size, so I've opted to leave it for some other day.

OTOH, we could declare that we handle it, and never actually send a gzipped file ;-) as long as we can handle gzipped content from the client.

cheers,
martin
Martin Langhoff· May 3, 2006, 11:11 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:
> Hmmm. 100% reproduceable -- looking at it now.

Grumble. Some recent change has broken cvsserver -- if I rewind to the commit I made of cvsserver, the checkout works correctly. I suspect changes to git-diff-tree. However, I'll play dumb and try bisect to see where it leads...

(Nice thing about bisecting with C code is that as you get closer the delta is smaller, and the recompile is smaller too ;-)

Ok -- an hour's gone by and I'm still fidgeting with bisect. It seems to have been broken soon after v1.3.0 but I'm having trouble nailing the commit, and understanding WRF has changed.

Can you test with git v1.3.0?
martin
Panagiotis Issaris· May 3, 2006, 11:36 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

Hi,
Martin Langhoff wrote:
Show 18 quoted lines
> On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:
>
>> Hmmm. 100% reproduceable -- looking at it now.
>
>
> Grumble. Some recent change has broken cvsserver -- if I rewind to the
> commit I made of cvsserver, the checkout works correctly. I suspect
> changes to git-diff-tree. However, I'll play dumb and try bisect to
> see where it leads...
>
> (Nice thing about bisecting with C code is that as you get closer the
> delta is smaller, and the recompile is smaller too ;-)
>
> Ok -- an hour's gone by and I'm still fidgeting with bisect. It seems
> to have been broken soon after v1.3.0 but I'm having trouble nailing
> the commit, and understanding WRF has changed.
>
> Can you test with git v1.3.0?

Yes, I installed 1.3.0 using "make prefix=/tmp/testje install" but, I'm getting the same problem (other then my failing typing skills ;-) :

takis@issaris:/tmp/a/c$ export PATH=/tmp/testje/bin/:$PATH takis@issaris:/tmp/a/c$ git --version git version 1.3.0 takis@issaris:/tmp/a/c$ cvs co -d project-master master takis@localhost's password: Permission denied, please try again. takis@localhost's password: Permission denied, please try again. takis@localhost's password: cvs checkout: Updating project-master U project-master/Makefile U project-master/README U project-master/cache.h U project-master/cat-file.c U project-master/commit-tree.c U project-master/init-db.c U project-master/read-cache.c U project-master/read-tree.c U project-master/show-diff.c U project-master/update-cache.c U project-master/write-tree.c closing dbh with active statement handles takis@issaris:/tmp/a/c$ which git /tmp/testje/bin//git

With friendly regards, Takis

Martin Langhoff· May 3, 2006, 11:42 UTC · re: Panagiotis Issaris · lore

Re: Problem using GIT CVS-server

On 5/3/06, Panagiotis Issaris <takis@lumumba.uhasselt.be> wrote:
> Yes, I installed 1.3.0 using "make prefix=/tmp/testje install"
> but, I'm getting the same problem (other then my failing typing
> skills ;-) :

The problem is that, while you are executing git-cvsserver from /tmp/testje, git-cvsserver invokes git-log from the path, and that is the "bad" git-log. Change your PATH in .bashrc so that the /tmp/testje install takes precedence...

cheers,
martin
Panagiotis Issaris· May 3, 2006, 12:02 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

Hi,
Martin Langhoff wrote:
Show 11 quoted lines
> On 5/3/06, Panagiotis Issaris <takis@lumumba.uhasselt.be> wrote:
>
>> Yes, I installed 1.3.0 using "make prefix=/tmp/testje install"
>> but, I'm getting the same problem (other then my failing typing
>> skills ;-) :
>
>
> The problem is that, while you are executing git-cvsserver from
> /tmp/testje, git-cvsserver invokes git-log from the path, and that is
> the "bad" git-log. Change your PATH in .bashrc so that the /tmp/testje
> install takes precedence...

Prefixing /tmp/testje/bin to my PATH in .bashrc wouldnt work, so I just replaced my locally built GIT-.deb package with a locally built v1.3.0 version of the package. All worked fine now! :-)

With friendly regards, Takis

Junio C Hamano· May 3, 2006, 19:49 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

"Martin Langhoff" <martin.langhoff@gmail.com> writes:
Show 7 quoted lines
> On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:
>> Hmmm. 100% reproduceable -- looking at it now.
>
> Grumble. Some recent change has broken cvsserver -- if I rewind to the
> commit I made of cvsserver, the checkout works correctly. I suspect
> changes to git-diff-tree. However, I'll play dumb and try bisect to
> see where it leads...

Ah, the "master" git-log is C-rewrite version and does not show the parents on the "commit (.*)" line itself with --parents.

Could you see if the attached patch helps?

When Linus and I did the rewrite, we tried to be somewhat careful not to break people's expectations, but at the same time, we considered that the log/show/whatchanged frontends to rev-list are primarily for human consumption, so we "improved" the details a bit [*1*], which obviously broke cvsserver's use of git-log.

*1* Another difference I know about is that whatchanged used to start an entry with "diff-tree" but now says "commit" like others in "log" family of frontends.

-- >8 --
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 11d153c..71e384c 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2076,14 +2076,15 @@ sub update
     # TODO: log processing is memory bound
     # if we can parse into a 2nd file that is in reverse order
     # we can probably do something really efficient
-    my @git_log_params = ('--parents', '--topo-order');
+    my @git_rl_params = ('--parents', '--topo-order', '--pretty');
 
     if (defined $lastcommit) {
-        push @git_log_params, "$lastcommit..$self->{module}";
+        push @git_rl_params, "$lastcommit..$self->{module}";
     } else {
-        push @git_log_params, $self->{module};
+        push @git_rl_params, $self->{module};
     }
-    open(GITLOG, '-|', 'git-log', @git_log_params) or die "Cannot call git-log: $!";
+    open(GITLOG, '-|', 'git-rev-list',
+	 @git_rl_params) or die "Cannot call git-rev-list: $!";
 
     my @commits;
 
Martin Langhoff· May 3, 2006, 21:12 UTC · re: Junio C Hamano · lore

Re: Problem using GIT CVS-server

On 5/4/06, Junio C Hamano <junkio@cox.net> wrote:
> Ah, the "master" git-log is C-rewrite version and does not show
> the parents on the "commit (.*)" line itself with --parents.
Exactly.
> Could you see if the attached patch helps?

Will try it in a moment. Having thought about it, git-log is always going to be tweaked for human consumption, so I should use something geared for porcelains instead. git-rev-list does honour --parent, so perhaps I should switch to using that instead?

cheers,
martin
Junio C Hamano· May 3, 2006, 21:21 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

"Martin Langhoff" <martin.langhoff@gmail.com> writes:
Show 6 quoted lines
>> Could you see if the attached patch helps?
>
> Will try it in a moment. Having thought about it, git-log is always
> going to be tweaked for human consumption, so I should use something
> geared for porcelains instead. git-rev-list does honour --parent, so
> perhaps I should switch to using that instead?

I think that reasoning is prudent, but at the same time I think the patch by Linus is also right, so I think we should do both for this particular case.

Sorry about the breakage.
Panagiotis Issaris· May 3, 2006, 11:41 UTC · re: Martin Langhoff · lore

Re: Problem using GIT CVS-server

Hi,
Martin Langhoff wrote:
> [...]
> thanks a lot for the feedback! cvsserver has mainly been
> tried/debugged with a few repositories, mainly the moodle.git
> repository that we host, which is an import from a CVS repo.

I didnt even know it existed! :) I was looking for an Eclipse plugin (anyone heard anything about such a beast after 20060313?), when I accidently stumbled upon the git-cvsserver manpage, somewhere on the web.

Show 9 quoted lines
> [...]
> That warning is harmless, and always there. I did look once at
> implementing gzip compression, but in some cases it implies creating
> extra temp files to calculate the size, so I've opted to leave it for
> some other day.
>
> OTOH, we could declare that we handle it, and never actually send a
> gzipped file ;-) as long as we can handle gzipped content from the
> client.

Not really an issue imho :) I just automatically type -z3 whenever I do a CVS update :)

BTW, thanks for writing git-cvsserver!

With friendly regards, Takis

← back to recent threads