# Problem using GIT CVS-server

13 messages from 2006-05-03 to 2006-05-03. Participants: Panagiotis Issaris, Andreas Ericsson, Martin Langhoff, Junio C Hamano.
Thread: https://gitlist.dev/t/4031

## Panagiotis Issaris, 2006-05-03 08:11

Subject: Problem using GIT CVS-server
Message-ID: <445865A5.5030700@lumumba.uhasselt.be>
URL: https://gitlist.dev/e/445865A5.5030700%40lumumba.uhasselt.be

```
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, 2006-05-03 08:17

Subject: Re: Problem using GIT CVS-server
Message-ID: <4458670A.4080205@op5.se>
URL: https://gitlist.dev/e/4458670A.4080205%40op5.se
In-Reply-To: <445865A5.5030700@lumumba.uhasselt.be>

```
Panagiotis Issaris wrote:
> 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, 2006-05-03 08:26

Subject: Re: Problem using GIT CVS-server
Message-ID: <4458691A.4010007@lumumba.uhasselt.be>
URL: https://gitlist.dev/e/4458691A.4010007%40lumumba.uhasselt.be
In-Reply-To: <4458670A.4080205@op5.se>

```
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, 2006-05-03 08:44

Subject: Re: Problem using GIT CVS-server
Message-ID: <44586D73.5060301@op5.se>
URL: https://gitlist.dev/e/44586D73.5060301%40op5.se
In-Reply-To: <4458691A.4010007@lumumba.uhasselt.be>

```
Panagiotis Issaris wrote:
> 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, 2006-05-03 10:11

Subject: Re: Problem using GIT CVS-server
Message-ID: <46a038f90605030311s4e05de2dr90277f97a3a5c223@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90605030311s4e05de2dr90277f97a3a5c223%40mail.gmail.com
In-Reply-To: <445865A5.5030700@lumumba.uhasselt.be>

```
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, 2006-05-03 11:11

Subject: Re: Problem using GIT CVS-server
Message-ID: <46a038f90605030411o29af1d1bra3276353347516f6@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90605030411o29af1d1bra3276353347516f6%40mail.gmail.com
In-Reply-To: <46a038f90605030311s4e05de2dr90277f97a3a5c223@mail.gmail.com>

```
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, 2006-05-03 11:36

Subject: Re: Problem using GIT CVS-server
Message-ID: <445895AC.6070109@lumumba.uhasselt.be>
URL: https://gitlist.dev/e/445895AC.6070109%40lumumba.uhasselt.be
In-Reply-To: <46a038f90605030411o29af1d1bra3276353347516f6@mail.gmail.com>

```
Hi,

Martin Langhoff wrote:

> 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

```

## Panagiotis Issaris, 2006-05-03 11:41

Subject: Re: Problem using GIT CVS-server
Message-ID: <445896E7.1070306@lumumba.uhasselt.be>
URL: https://gitlist.dev/e/445896E7.1070306%40lumumba.uhasselt.be
In-Reply-To: <46a038f90605030311s4e05de2dr90277f97a3a5c223@mail.gmail.com>

```
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.

> [...]
> 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

```

## Martin Langhoff, 2006-05-03 11:42

Subject: Re: Problem using GIT CVS-server
Message-ID: <46a038f90605030442k5c4eee9dj25d4a467942b0f74@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90605030442k5c4eee9dj25d4a467942b0f74%40mail.gmail.com
In-Reply-To: <445895AC.6070109@lumumba.uhasselt.be>

```
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, 2006-05-03 12:02

Subject: Re: Problem using GIT CVS-server
Message-ID: <44589BED.20503@lumumba.uhasselt.be>
URL: https://gitlist.dev/e/44589BED.20503%40lumumba.uhasselt.be
In-Reply-To: <46a038f90605030442k5c4eee9dj25d4a467942b0f74@mail.gmail.com>

```
Hi,

Martin Langhoff wrote:

> 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, 2006-05-03 19:49

Subject: Re: Problem using GIT CVS-server
Message-ID: <7v1wvaevno.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1wvaevno.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <46a038f90605030411o29af1d1bra3276353347516f6@mail.gmail.com>

```
"Martin Langhoff" <martin.langhoff@gmail.com> writes:

> 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, 2006-05-03 21:12

Subject: Re: Problem using GIT CVS-server
Message-ID: <46a038f90605031412s363b4a79p548c75956b00adbf@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90605031412s363b4a79p548c75956b00adbf%40mail.gmail.com
In-Reply-To: <7v1wvaevno.fsf@assigned-by-dhcp.cox.net>

```
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, 2006-05-03 21:21

Subject: Re: Problem using GIT CVS-server
Message-ID: <7vmzdyby99.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vmzdyby99.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <46a038f90605031412s363b4a79p548c75956b00adbf@mail.gmail.com>

```
"Martin Langhoff" <martin.langhoff@gmail.com> writes:

>> 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.

```
