git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Efficient way to import snapshots?
@ 2007-07-30 18:07 Craig Boston
  2007-07-30 18:56 ` Linus Torvalds
  2007-07-30 21:54 ` David Kastrup
  0 siblings, 2 replies; 27+ messages in thread
From: Craig Boston @ 2007-07-30 18:07 UTC (permalink / raw)
  To: git

Hello, I'm seeking some input from git users/developers to try and solve
a problem I'm encountering.  I'm new with git, having used quite a bit
of Subversion and SVK in the past, but have heard good things and
decided to give it a try.

First, a little bit about what I'm trying to accomplish.  There is a
large source tree -- FreeBSD to be specific -- which is maintained in
CVS.  I want to have several local branches where I can develop specific
projects.  Each of these branches should derive from either the HEAD of
the CVS tree, or from one of the release branches (known as the -STABLE
branch for a particular version of the OS).

That said, I really don't want to have to import the entire CVS
repository.  It has many, many branches and tags that I'm not interested
in, and I really don't need the entire history of the project.  I don't
even really need individual commit history.  I can see that easily enough
on cvsweb.  Repo size is a big factor as I need to replicate it between
several different work machines, some of which don't have unlimited disk
space.

What I'm currently doing (using SVK) is nightly, taking a snapshot using
cvsup of each of the 3 branches that I care about, then using "svk
import" to pull the snapshot into a local branch that I treat as a
vendor branch.  My projects are branched off those and I regularly
smerge changes over.  It works pretty well for me, the only downside is
that svk isn't exactly fast, having to load lots of perl modules for
every command.

I'd like to do something similar with git -- I like the idea of it
having many less dependencies that must be installed, and it's supposed
to be quite a bit faster when dealing with working copies.  From reading
about it I think it may also be easier to generate diffs of my branches
from their origins.

So far the main snag I've found is that AFAIK there's no equivalent to
"svk import" to load a big tree (~37000 files) into a branch and commit
the changes.  Here's the procedure I've come up with:

cd /path/to/git/repo
git checkout vendor_branch_X
git rm -r .
cp -R /path/to/cvs/checkout_X/* ./
git add .
git commit -m"Import yyyymmdd snapshot"

However this has quite a few disadvantages when compared to svk.  The
first is that I have to checkout into a working directory and then copy
the files from the cvs checkout.  It is also considerably slower than
svk import, about 7-8 times on average.  When there are a lot of
changes I've seen the git process use upwards of 1GB of memory; it
actually died the first time I tried it because I didn't have any swap
configured.

Now, I don't have very much experience with git, so for my question: Is
there a better way to do this?  Either importing a lot of files into
git, or a better solution for that I'm trying to do.

Any pointers would be much appreciated.

Thanks!

Craig

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-07-31 16:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 18:07 Efficient way to import snapshots? Craig Boston
2007-07-30 18:56 ` Linus Torvalds
2007-07-30 19:29   ` Craig Boston
2007-07-30 19:52     ` Linus Torvalds
2007-07-30 20:10       ` Craig Boston
2007-07-30 21:29         ` Junio C Hamano
2007-07-30 21:49           ` Craig Boston
2007-07-30 21:04       ` Junio C Hamano
2007-07-30 23:19         ` Linus Torvalds
2007-07-30 21:55       ` Junio C Hamano
2007-07-30 23:27         ` Linus Torvalds
2007-07-30 23:59           ` Junio C Hamano
2007-07-31  0:45             ` Linus Torvalds
2007-07-31  0:47               ` Junio C Hamano
2007-07-30 22:20       ` Craig Boston
2007-07-30 23:30         ` Linus Torvalds
2007-07-31  1:17           ` Craig Boston
2007-07-31  1:44             ` Linus Torvalds
2007-07-31  4:23               ` Theodore Tso
2007-07-31 13:53                 ` Craig Boston
2007-07-31 15:50                   ` Linus Torvalds
2007-07-31 16:15                     ` Theodore Tso
2007-07-31  6:23           ` David Kastrup
2007-07-31  7:54             ` Florian Weimer
2007-07-31  8:48               ` David Kastrup
2007-07-30 21:22   ` Jakub Narebski
2007-07-30 21:54 ` David Kastrup

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