Gentoo Archives: gentoo-scm

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-scm@l.g.o
Subject: [gentoo-scm] Testing git conversion
Date: Tue, 28 Oct 2008 06:02:00
Message-Id: 20081028060155.GB16435@comet.hsd1.or.comcast.net
1 After talking with some git developers at the Summer of Code mentor
2 summit, I resumed work on getting gentoo-x86 into git. Today I got the
3 first conversion to git from cvs working, using cvs2svn's cvs2git
4 backend. I attached the config files I used. Here was the process:
5
6 - Start with an rsync of the gentoo-x86 cvs repo
7 (see http://anoncvs.gentoo.org/).
8 - `mkdir CVSROOT` in the same level as gentoo-x86
9 - cvs2svn --options=cvs2svn-git.options | tee cvs2svn.log
10 - mkdir gentoo-x86-cvs2git
11 - cd gentoo-x86-cvs2git/
12 - git init
13 - cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat \
14 | git fast-import | tee git-fast-import.log
15 - time git repack -a -d -f -l --window=50 | tee git-repack.log
16 (took ~25 minutes)
17 - rsync -avzP -e ssh .git/ dev.gentoo.org:public_html/gentoo-x86.git/
18
19 Here's some stats on the conversion:
20
21 Total CVS Files: 341121
22 Total CVS Revisions: 2035092
23 Total CVS Branches: 0
24 Total CVS Tags: 0
25 Total Unique Tags: 0
26 Total Unique Branches: 0
27 CVS Repos Size in KB: 1412266
28 Total SVN Commits: 591101
29 First Revision Date: Thu Jul 27 17:35:42 2000
30 Last Revision Date: Sun Oct 26 15:43:43 2008
31 ------------------
32 Timings (seconds):
33 ------------------
34 22743 pass1 CollectRevsPass
35 38 pass2 CleanMetadataPass
36 0 pass3 CollateSymbolsPass
37 184 pass4 FilterSymbolsPass
38 3 pass5 SortRevisionSummaryPass
39 0 pass6 SortSymbolSummaryPass
40 222 pass7 InitializeChangesetsPass
41 2535 pass8 BreakRevisionChangesetCyclesPass
42 13238 pass9 RevisionTopologicalSortPass
43 60 pass10 BreakSymbolChangesetCyclesPass
44 218 pass11 BreakAllChangesetCyclesPass
45 187 pass12 TopologicalSortPass
46 457 pass13 CreateRevsPass
47 0 pass14 SortSymbolsPass
48 0 pass15 IndexSymbolsPass
49 176 pass16 OutputPass
50 40062 total
51
52
53 It took about 12 hours in total, running on a brand-new consumer-level
54 box (no RAID, etc). It might run as much as 3x faster if I put the whole
55 repo into a ramdisk beforehand, because that ought to remove a lot of
56 the pass1 time (reading ,v files). The other place that took a lot of
57 time, pass9, seemed mostly CPU-bound.
58
59 If you want to grab a copy of the tree and check it out, you can. If
60 you're a dev, don't clone over ssh because it hits the server really
61 hard. (This remains to be solved.) Here's the place:
62
63 git clone http://dev.gentoo.org/~dberkholz/gentoo-x86.git
64
65 The repo is around 900M, including all history, thanks to git's pack
66 compression. That's roughly equivalent to the size of a cvs checkout
67 with no history.
68
69 One obvious thing to fix for a final version is adding the author map
70 into the config files so we get real names for people. That won't be
71 very hard -- we should be able to just pull everything from ldap.
72
73 A clear next step is to compare a native cvs checkout with a cvs
74 checkout of the git repo through `git cvsserver`. Does anyone want to
75 help out and do this?
76
77 --
78 Thanks,
79 Donnie
80
81 Donnie Berkholz
82 Developer, Gentoo Linux
83 Blog: http://dberkholz.wordpress.com

Attachments

File name MIME type
cvs2svn-example.options text/plain
cvs2svn-git.options text/plain

Replies

Subject Author
Re: [gentoo-scm] Testing git conversion "Robin H. Johnson" <robbat2@g.o>