git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marin Atanasov <dnaeon@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: Git and cvsimport
Date: Tue, 27 Apr 2010 13:41:31 +0300	[thread overview]
Message-ID: <l2w717f7a3e1004270341lea6cfe2aqdf8d2b490b1ec067@mail.gmail.com> (raw)
In-Reply-To: <4BD69450.8040608@drmicha.warpmail.net>

On Tue, Apr 27, 2010 at 10:37 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Marin Atanasov venit, vidit, dixit 26.04.2010 16:27:
>> Hello,
>>
>> I need to import an existing CVS repo to Git. Using git-cvsimport
>> works well for me when importing from the CVS server itself, but I
>> need to do something different.
>>
>> Here's a little info about what I'm doing.
>>
>> $ pwd
>> /home/<user>/test
>>
>> $ git --version
>> git version 1.5.6.5
>>
>> $ git cvsimport -v -d :pserver:<user>@<server>:/var/
>> cvsroot -C test.git test-repo
>> Initialized empty Git repository in /home/<user>/test/test.git/.git/
>> Running cvsps...
>> connect error: Network is unreachable
>> cvs rlog: Logging test-repo
>> Fetching file1   v 1.1
>> New file1: 14 bytes
>> Fetching file2   v 1.1
>> New file2: 14 bytes
>> Fetching file3   v 1.1
>> New file3: 14 bytes
>> Tree ID bf675ce25c8ca3fd1f4a120ea933510c90ccda16
>> Parent ID (empty)
>> Committed patch 1 (origin +0000 2010-04-26 09:40:58)
>> Commit ID 377641eae81975e214a579da9e6c0c5afd819b17
>> Created tag 'SOMETAG' on 'origin'
>> Fetching file1   v 1.2
>> Update file1: 47 bytes
>> Fetching file3   v 1.2
>> Update file3: 47 bytes
>> Tree ID 10ab70cdcc53bb94684d09e60817bb62cb8c3d98
>> Parent ID 377641eae81975e214a579da9e6c0c5afd819b17
>> Committed patch 2 (origin +0000 2010-04-26 09:44:22)
>> Commit ID fea2a99c906e57df5c4735ba3f9627cbb8fba295
>> DONE; creating master branch
>>
>> The above commands works fine, when I directly get the files from the
>> CVS server, but I want to do the following.
>>
>>  - checkout files from CVS, which are already tagged with certain
>> names to a local folder
>>  - then import those files to Git with git-cvsimport
>>  - fetch those imports later by a shared bare repo into different
>> branches, so at the end each branch will contain the files with the
>> certain tag.
>>
>> So, If i do the following, then git-cvsimport fails:
>>
>> $ pwd
>> /home/<user>/test
>>
>> $ cvs -d :pserver:<user>@<server>:/var/cvsroot co -r SOMETAG test-repo
>> cvs checkout: Updating test-repo
>> U test-repo/file1
>> U test-repo/file2
>> U test-repo/file3
>>
>> $ git cvsimport -v -d /home/<user>/test -C test.git test-repo
>> Expected Valid-requests from server, but got: E Cannot access
>> /home/<user>/test/CVSROOT
>>
>> Can you give me some hints how to do this? Seems that I can import CVS
>> repos from remote server, but cannot do this from a local folder..
>
> ... because a folder is not a server, and a cvs checkout is not a cvs repo.
>
> It's not completely clear to me what you want and why, but the simplest
> way seems to be to checkout each cvs tag using cvs, and (add &) commit
> the result to the git branch of your choice using git. You don't seem to
> want to convert the cvs repo, so don't use git cvs-import.
>
> But, really, I don't know what you want - history-less git branches from
> cvs tags?
>
> Michael
>

Hello Michael,

Perhaps I didn't explain better what I want to accomplish :)

I want to convert CVS repo to a Git one.

But checking  out from CVS and then converting to Git, checks out HEAD
from CVS, thus the latest revisions.

What I want to do is to checkout from CVS the files which are tagged
RELEASE_1_0 for example, and then import the files to a Git repo.
Files tagged as RELEASE_1_0 differ from HEAD files, so I want only
those files with that tag for example.

Is this possible to do with git-cvsimport, to specify the tag you want
to checkout from CVS?

I went through the documentation, but didn't see something like that.

If I checkout the files from CVS with that tag and then add, commit to
a git repo, then I'll lose the CVS history, and this is most important
for me keep.

Regards,
Marin

--
Marin Atanasov Nikolov
dnaeon AT gmail DOT com
daemon AT unix-heaven DOT org

  reply	other threads:[~2010-04-27 10:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 14:27 Git and cvsimport Marin Atanasov
2010-04-27  7:37 ` Michael J Gruber
2010-04-27 10:41   ` Marin Atanasov [this message]
2010-04-27 11:03     ` Michael J Gruber
2010-04-27 11:57     ` Nick
2010-04-27 11:58     ` Tor Arntsen
2010-04-28  5:27       ` Marin Atanasov Nikolov
2010-04-28  9:19         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=l2w717f7a3e1004270341lea6cfe2aqdf8d2b490b1ec067@mail.gmail.com \
    --to=dnaeon@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).