threads / discuss / 6987

Problems with git cvsimport

Subject: Problems with git cvsimport

## tl;dr

10 messages between Feb 27, 2007 and Mar 3, 2007.

replies: 9people: 4as markdown or json

Raimund Bauer· Feb 27, 2007, 11:13 UTC · lore
When trying to cvsimport a project into git, I get an error from cvsps:
bad usage: invalid argument -A
Usage: cvsps [-h] [-x] [-u] [-z <fuzz>] [-g] [-s <range>[,<range>]]
             [-a <author>] [-f <file>] [-d <date1> [-d <date2>]]
             [-b <branch>]  [-l <regex>] [-r <tag> [-r <tag>]]
             [-p <directory>] [-v] [-t] [--norc] [--summary-first]
             [--test-log <captured cvs log file>] [--bkcvs]
             [--no-rlog] [--diff-opts <option string>] [--cvs-direct]
             [--debuglvl <bitmask>] [-Z <compression>] [--root <cvsroot>]
             [<repository>] [-q]
<-- cut option explanation -->

There is cvsps version 2.0rc1 installed on our server (a Suse 9.3 I believe), and using git version 1.5.0.2.775.g1a500 (next from a few minutes ago).

Many thanx in advance for any hints on how to make this work
-- 
best regards

  Ray
Johannes Schindelin· Feb 27, 2007, 12:19 UTC · re: Raimund Bauer · lore

Re: Problems with git cvsimport

Hi,
On Tue, 27 Feb 2007, Raimund Bauer wrote:
> When trying to cvsimport a project into git, I get an error from cvsps:
> 
> bad usage: invalid argument -A
What was your command line?

Ciao, Dscho

Junio C Hamano· Feb 27, 2007, 12:24 UTC · re: Johannes Schindelin · lore

Re: Problems with git cvsimport

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> On Tue, 27 Feb 2007, Raimund Bauer wrote:
>
>> When trying to cvsimport a project into git, I get an error from cvsps:
>> 
>> bad usage: invalid argument -A
>
> What was your command line?

Very good question. Earlier I was doing grep, and as far as I can tell, git-cvsimport in Perl _always_ has passed -A to cvsps.

Raimund Bauer· Feb 27, 2007, 13:12 UTC · re: Johannes Schindelin · lore

RE: Problems with git cvsimport

Show 6 quoted lines
> > When trying to cvsimport a project into git, I get an error from 
> > cvsps:
> > 
> > bad usage: invalid argument -A
> 
> What was your command line?
The complete command line was

git-cvsimport -d :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C views -k contributions/modules/views

Leaving out -k doesn't change anything. And the manpage for git-cvsimport says, option -A is implicit ...

> Ciao,
> Dscho
-- 
best regards

  Ray
Johannes Schindelin· Feb 27, 2007, 16:01 UTC · re: Raimund Bauer · lore

RE: Problems with git cvsimport

Hi,
On Tue, 27 Feb 2007, Raimund Bauer wrote:
Show 11 quoted lines
> > > When trying to cvsimport a project into git, I get an error from 
> > > cvsps:
> > > 
> > > bad usage: invalid argument -A
> > 
> > What was your command line?
> 
> The complete command line was
> 
> git-cvsimport -d :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C views
> -k contributions/modules/views

Sorry to have missed that earlier. AFAIR cvsimport _needs_ cvsps 2.1. You have version 2.0rc1, which is not sufficient...

Ciao, Dscho

Raimund Bauer· Feb 27, 2007, 16:15 UTC · re: Johannes Schindelin · lore

RE: Problems with git cvsimport

Show 16 quoted lines
> > > > When trying to cvsimport a project into git, I get an error from
> > > > cvsps:
> > > > 
> > > > bad usage: invalid argument -A
> > > 
> > > What was your command line?
> > 
> > The complete command line was
> > 
> > git-cvsimport -d 
> :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C 
> > views -k contributions/modules/views
> 
> Sorry to have missed that earlier. AFAIR cvsimport _needs_ 
> cvsps 2.1. You 
> have version 2.0rc1, which is not sufficient...
Thanks, I will make sure we get a new cvsps on the server.
> Ciao,
> Dscho
-- 
best regards

  Ray
Raimund Bauer· Feb 28, 2007, 13:27 UTC · re: Johannes Schindelin · lore

RE: Problems with git cvsimport

> Sorry to have missed that earlier. AFAIR cvsimport _needs_ 
> cvsps 2.1. You 
> have version 2.0rc1, which is not sufficient...

OK, thanks a lot, now that I'm using cvsps especially for git from http://ydirson.free.fr/en/software/scm/cvsps.html things are looking a bit better.

There are some modules I can import with relative little noise. Not sure why I needed to do 'checkout -f' to get all the files in the working directory, but I got no problem with that.

For some other modules it doesn't work at all. I.e. trying

$ git cvsimport -d :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C localizer -a contributions/modules/localizer Initialized empty Git repository in /home/ray/drupal/modules/localizer/.git/ file 'CHANGELOG.txt; pre_rev:INITIAL; post_rev:1.1; dead:0; branch_point:0 ' not found in hash fatal: refs/heads/origin: not a valid SHA1 fatal: master: not a valid SHA1 warning: You appear to be on a branch yet to be born. warning: Forcing checkout of HEAD. fatal: just how do you expect me to merge 0 trees? checkout failed: 256

Any hint what I have done wrong?

Doing a normal cvs checkout works, trying to do a git-cvsimport in the checked-out directory fails with the same error again.

For trying out, username=anonymous, password=anonymous should work. Or to just see what's in the repo, you can have a look at http://cvs.drupal.org/viewcvs/drupal/contributions/modules/localizer/ to see the repo I tried in the example above.

My perl knowledge is _very_ limited, but I'll have a look at the script too ...

-- 
best regards

  Ray
Johannes Schindelin· Mar 3, 2007, 00:30 UTC · re: Raimund Bauer · lore

RE: Problems with git cvsimport

Hi,
On Wed, 28 Feb 2007, Raimund Bauer wrote:
Show 7 quoted lines
> $ git cvsimport -d :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C
> localizer -a contributions/modules/localizer
> Initialized empty Git repository in /home/ray/drupal/modules/localizer/.git/
> file 'CHANGELOG.txt; pre_rev:INITIAL; post_rev:1.1; dead:0; branch_point:0
> ' not found in hash
> fatal: refs/heads/origin: not a valid SHA1
> fatal: master: not a valid SHA1

This looks to me as if you did not cleanup after failed attempts. I would try this in a fresh directory. Actually, I did, and I think it worked, too... Latest commit is

commit 8fc1b3decbe961925e3d043f5e03b10e2093d72b
Author: robertogerola <robertogerola>
Date:   Tue Feb 13 13:22:53 2007 +0000
    Updated

Ciao, Dscho

Raimund Bauer· Mar 3, 2007, 12:31 UTC · re: Johannes Schindelin · lore

RE: Problems with git cvsimport

On Sat, 2007-03-03 at 01:30 +0100, Johannes Schindelin wrote:
Show 14 quoted lines
> Hi,
> 
> On Wed, 28 Feb 2007, Raimund Bauer wrote:
> 
> > $ git cvsimport -d :pserver:ray007@cvs.drupal.org:/cvs/drupal-contrib -C
> > localizer -a contributions/modules/localizer
> > Initialized empty Git repository in /home/ray/drupal/modules/localizer/.git/
> > file 'CHANGELOG.txt; pre_rev:INITIAL; post_rev:1.1; dead:0; branch_point:0
> > ' not found in hash
> > fatal: refs/heads/origin: not a valid SHA1
> > fatal: master: not a valid SHA1
> 
> This looks to me as if you did not cleanup after failed attempts. I would 
> try this in a fresh directory. Actually, I did, and I think it worked, 
I always tried with a new directory, that's not the reason.

I've just tried it out on my home-box, which is a ubuntu edgy x86 installation, and git-cvsimport seems to work quite fine here.

On our server, which is a suse 9.3 amd64 installation (with the latest suse updates for that version), I just can't get it to run. Currently I wonder how I got _any_ git-cvsimport to work there. Still the same error 256 ...

How do I find out the minimum-version of tools I need to use git-cvsimport? I already know about cvsps and did install a current version there, but there seem to be some more dependencies ... Or could it be a 64-bit issue somewhere?

'make test' says everything is fine.

If you can point me in the some direction on how to debug this, I'll give it a try, currently I have no clue where to start.

Show 5 quoted lines
> too... Latest commit is
> 
> commit 8fc1b3decbe961925e3d043f5e03b10e2093d72b
> Author: robertogerola <robertogerola>
> Date:   Tue Feb 13 13:22:53 2007 +0000

Yes, that looks good. Which means something on our server is the reason for git-cvsimport not working.

Continuing  investigation ...
-- 
best regards

  Ray
Johannes Schindelin· Mar 3, 2007, 16:21 UTC · re: Raimund Bauer · lore

RE: Problems with git cvsimport

Hi,
On Sat, 3 Mar 2007, Raimund Bauer wrote:
Show 12 quoted lines
> I've just tried it out on my home-box, which is a ubuntu edgy x86 
> installation, and git-cvsimport seems to work quite fine here.
> 
> On our server, which is a suse 9.3 amd64 installation (with the latest 
> suse updates for that version), I just can't get it to run. Currently I 
> wonder how I got _any_ git-cvsimport to work there. Still the same error 
> 256 ...
> 
> How do I find out the minimum-version of tools I need to use
> git-cvsimport? I already know about cvsps and did install a current
> version there, but there seem to be some more dependencies ...
> Or could it be a 64-bit issue somewhere?

It could be. I'd first try cvsps itself, to find out if the issue is not there (not many 64-bit issues in Perl, are there?).

Hth, Dscho

← back to recent threads