From: Michael Haggerty <mhagger@alum.mit.edu>
To: "Kelly F. Hickel" <kfh@mqsoftware.com>
Cc: git@vger.kernel.org
Subject: Re: cvs2git with modules?
Date: Tue, 17 Jun 2008 17:45:16 +0200 [thread overview]
Message-ID: <4857DC0C.8060902@alum.mit.edu> (raw)
In-Reply-To: <63BEA5E623E09F4D92233FB12A9F794302389A59@emailmn.mqsoftware.com>
[I see you sent essentially the same question to both the git and the
cvs2svn mailing lists. I am replying on the git list with bcc to the
cvs2svn list. Followups please to git@vger.kernel.org.]
Kelly F. Hickel wrote:
> I'm trying to use cvs2svn in cvs2git mode to convert a repo with a
> number of modules. Can anyone tell me how to keep that module
> structure in the new git repo? So, if in cvs there are two modules,
> ModA and ModB, I want to see those two as top level directories in
> the git repo.
>
> I've tried putting adding the projects in my options file as below,
> but it puts the files ModA/* and ModB/* at the top level in the git repo.
>
> run_options.add_project(
> r'/home/foo/cvsrepo/ModA,
> trunk_path=ModA',
> [...]
> )
>
> run_options.add_project(
> r'/home/foo/cvsrepo/ModB,
> trunk_path=ModB',
> [...]
> )
I assume that what you mean is that the CVS repository contains
directories like ModA/a, ModA/b, ModB/c, and ModB/d, but the resulting
git repository has only /a, /b, /c, and /d. That is because cvs2git
completely ignores the trunk_path argument to add_project().
It is strange that the code allows you to add multiple projects,
considering that the cvs2git documentation[1] states that cvs2git only
supports converting single projects at a time. I guess I forgot to
build that check in.
You can get the result you want by treating ModA and ModB not as two
separate projects, but simply as two separate subdirectories within a
bigger project; i.e.,
run_options.add_project(
r'/home/foo/cvsrepo,
[...]
)
. This is assuming that ModA and ModB are the only subdirectories
within /home/foo/cvsrepo/; otherwise, make a copy of your CVS repo and
remove the other subdirectories from the copy before the conversion.
Please note that when cvs2git is run this way, it treats tags and
branches as being global. If you tagged your projects simultaneously,
then this is probably what you want. But if you tagged your projects
separately, then tag names that happen to be the same across projects
will be considered the same.
It would be possible to add cvs2git support for multiproject
conversions, but I was under the impression that it doesn't make much
sense to put multiple projects into a single git repository. But I'm a
novice git user, so I could very well be wrong about that.
Michael
[1] http://cvs2svn.tigris.org/cvs2git.html
next prev parent reply other threads:[~2008-06-17 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 11:21 cvs2git with modules? Kelly F. Hickel
2008-06-17 15:45 ` Michael Haggerty [this message]
2008-06-17 18:02 ` Geoffrey Irving
2008-06-17 18:06 ` Geoffrey Irving
[not found] <63BEA5E623E09F4D92233FB12A9F794302389AC6@emailmn.mqsoftware.com>
2008-06-18 20:24 ` Kelly F. Hickel
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=4857DC0C.8060902@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=kfh@mqsoftware.com \
/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).