Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333872 - Git migration request: CDO
Summary: Git migration request: CDO
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 09:39 EST by Eike Stepper CLA
Modified: 2011-01-17 11:35 EST (History)
3 users (show)

See Also:


Attachments
CVS Branches (11.54 KB, image/png)
2011-01-11 21:23 EST, Eike Stepper CLA
no flags Details
CVS Tags (25.67 KB, image/png)
2011-01-11 21:23 EST, Eike Stepper CLA
no flags Details
Bucky's RMAP for Git (for future reference) (10.23 KB, text/xml)
2011-01-17 10:31 EST, Eike Stepper CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2011-01-10 09:39:33 EST
Hi Webmasters,

The CDO (org.eclipse.emf.cdo) project wants to move from CVS to Git and *keep the whole history* .

I would like to have a single Git repository with the contents of /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.cdo

And the /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.cdo.deprecated folder should appear as a subfolder of the Git repository. Would you like me to move it in CVS first?

As most of our committers are located in Europe it would be cool if you can perform the migration in your later working hours (given you work in America).

The description of the Git repo shall be "CDO Model Repository" and the owner "Eike Stepper".

Is it possible to have something like a read-only CVS proxy for the new Git repo? Something that users can use to still checkout from CVS? That seems especially important for all the CVS-based patches that still hang out in bugzilla.

Any infos missing?
Comment 1 Eclipse Webmaster CLA 2011-01-10 16:32:00 EST
Moving things in cvs first so they appear how you'd like them in GIT will make things easier.  

I can certainly do the import(or you(or another committer with ssh access)) can do it if you like.  If you want me to do it, we should just pick a day so you can get everyone started cleanly after the import.

The import tools do their best to retain all of the history, but as will all such tools it's possible that some things won't translate cleanly(I haven't seen this myself but it's possible).

I can leave your CVS repo in a read only state for a few months, but if you're looking for us to actively 'mirror' from GIT to CVS that's just not something we support.

-M.
Comment 2 Eike Stepper CLA 2011-01-11 03:29:39 EST
(In reply to comment #1)
> Moving things in cvs first so they appear how you'd like them in GIT will make
> things easier.

Done. The contents of /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.cdo are now the (only) root elements of the new Git repo.

> I can certainly do the import(or you(or another committer with ssh access)) can
> do it if you like.  If you want me to do it, we should just pick a day so you
> can get everyone started cleanly after the import.

I've asked my team for objections against tonight (your evening). If you don't hear from me in the meantime it would be cool if could do the import for me then, so that I can start to verify it tomorrow.

> The import tools do their best to retain all of the history, but as will all
> such tools it's possible that some things won't translate cleanly(I haven't
> seen this myself but it's possible).

There is no other way than trying it out. And in the worst case we'd have the original CVS repo as a backup.

> I can leave your CVS repo in a read only state for a few months, 

Yes, please. That'd be very important until we're sure that the migration was a success.

> but if you're
> looking for us to actively 'mirror' from GIT to CVS that's just not something
> we support.

A pity but this is no blocker ;-)

Thanks for your help!
Comment 3 Eike Stepper CLA 2011-01-11 11:49:48 EST
Nobody from my team has complained. In fact they're looking forward to profit from Git's benefits ;-)

If you want, you can start the migration NOW. I'll be around for some hours in case you're having troubles...
Comment 4 Eclipse Webmaster CLA 2011-01-11 16:19:29 EST
Ok I think the import is complete.  Take a look here: /gitroot/cdo/org.eclipse.emf.cdo and tell me if anything is missing.

-M.
Comment 5 Eike Stepper CLA 2011-01-11 21:23:13 EST
I'm looking at http://git.eclipse.org/c/cdo/org.eclipse.emf.cdo.git/ , right?

That is unfortunately completely incomplete. Many branches are missing including the most important ones R2_0_maintenance, R3_0_maintenance and CVS HEAD. Most of the tags are missing. And the tree seems to miss a whole bunch of projects.

Please compare with http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.emf/org.eclipse.emf.cdo/?root=Modeling_Project (even there the deprecated folder that I moved yesterday is missing). I'll attach some screenshots from my IDE...

Am I looking at the wrong place?
Comment 6 Eike Stepper CLA 2011-01-11 21:23:33 EST
Created attachment 186593 [details]
CVS Branches
Comment 7 Eike Stepper CLA 2011-01-11 21:23:49 EST
Created attachment 186594 [details]
CVS Tags
Comment 8 Eike Stepper CLA 2011-01-11 21:34:56 EST
(In reply to comment #4)
> Ok I think the import is complete. 

Are you sure it's finished?
Comment 9 Eike Stepper CLA 2011-01-12 02:19:51 EST
I checked some hours later now and there seems to be no further changes. I think we can be sure the import is finished now and that it failed ;-(
Comment 10 Eike Stepper CLA 2011-01-12 07:33:14 EST
How did you do the import? I'm currently experimenting with:

bin/cvs2svn-2.3.0/cvs2git --blobfile=ALL-blob.dat --dumpfile=ALL-dump.dat --username=estepper --fallback-encoding=UTF-8 /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.cdo
Comment 11 Eike Stepper CLA 2011-01-12 08:05:48 EST
This is the result of my cvs2git run:

cvs2svn Statistics:
------------------
Total CVS Files:             18432
Total CVS Revisions:         99059
Total CVS Branches:          46115
Total CVS Tags:             122792
Total Unique Tags:              77
Total Unique Branches:          25
CVS Repos Size in KB:       201287
Total SVN Commits:            6926
First Revision Date:    Sat Apr  1 05:37:52 2006
Last Revision Date:     Tue Jan 11 02:25:10 2011

Timings (seconds):
------------------
3033   pass1    CollectRevsPass
   0   pass2    CleanMetadataPass
   0   pass3    CollateSymbolsPass
  36   pass4    FilterSymbolsPass
   0   pass5    SortRevisionSummaryPass
   1   pass6    SortSymbolSummaryPass
  42   pass7    InitializeChangesetsPass
  18   pass8    BreakRevisionChangesetCyclesPass
  20   pass9    RevisionTopologicalSortPass
  15   pass10   BreakSymbolChangesetCyclesPass
  33   pass11   BreakAllChangesetCyclesPass
  28   pass12   TopologicalSortPass
  52   pass13   CreateRevsPass
   1   pass14   SortSymbolsPass
   1   pass15   IndexSymbolsPass
  59   pass16   OutputPass
3340   total

estepper@dev1:~> ll
total 607340
-rw-rw-r-- 1 estepper common 595723403 2011-01-12 07:34 ALL-blob.dat
-rw-rw-r-- 1 estepper common  25556086 2011-01-12 07:40 ALL-dump.dat

According to http://cvs2svn.tigris.org/cvs2git.html you can now create a git repo with:

git init
cat ~estepper/ALL-blob.dat ~estepper/ALL-dump.dat | git fast-import

Could you please try that for me? Or do you have different suggestions?
Comment 12 Eike Stepper CLA 2011-01-12 08:48:35 EST
Hurray!!! I downloaded the two .dat files and could import them into a git repository (see comment #11):

Stepper@PANDORA /c/develop/git (master)
$ cat ALL-blob.dat ALL-dump.dat | git fast-import
C:\Program Files (x86)\Git\libexec\git-core\git-fast-import.exe statistics:
---------------------------------------------------------------------
Alloc'd objects:     220000
Total objects:       215627 (     56387 duplicates                  )
      blobs  :        75000 (     14781 duplicates      66494 deltas)
      trees  :       133709 (     41606 duplicates      61686 deltas)
      commits:         6918 (         0 duplicates          0 deltas)
      tags   :            0 (         0 duplicates          0 deltas)
Total branches:         104 (        41 loads     )
      marks:     1073741824 (     96699 unique    )
      atoms:           9565
Memory total:         12469 KiB
       pools:          3876 KiB
     objects:          8593 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =      65536
pack_report: core.packedGitWindowSize =   33554432
pack_report: core.packedGitLimit      =  268435456
pack_report: pack_used_ctr            =       7371
pack_report: pack_mmap_calls          =        107
pack_report: pack_open_windows        =          1 /          2
pack_report: pack_mapped              =   21642556 /   26345796
---------------------------------------------------------------------

All objects, branches and tags seem to be there ;-)
Comment 13 Eclipse Webmaster CLA 2011-01-12 10:37:15 EST
Here's the import command I used:

git-cvsimport -i -p -x -d :local:/home/data2/cvs/modeling org.eclipse.emf/org.eclipse.emf.cdo -C /gitroot/cdo/

Since this uses the mirrored CVS data it's possible that the import coughed somewhere if the mirror was being updated while the import was running.

I'm re-running the import of the 'live' data.

-M.
Comment 14 Eike Stepper CLA 2011-01-12 10:40:02 EST
(In reply to comment #13)
> Here's the import command I used:
> 
> git-cvsimport -i -p -x -d :local:/home/data2/cvs/modeling
> org.eclipse.emf/org.eclipse.emf.cdo -C /gitroot/cdo/
> 
> Since this uses the mirrored CVS data it's possible that the import coughed
> somewhere if the mirror was being updated while the import was running.
> 
> I'm re-running the import of the 'live' data.

If it works I'm fine with it. But I've read that te cvs2git mechanism is supposed to be better. Anyway, if your new attempt fails again, you can use the .dat files from my home folder estepper. They are 'live' until tomorrow (generally no commits without my review :P )
Comment 15 Eclipse Webmaster CLA 2011-01-12 11:21:13 EST
Hmm, well I sat and watched the import and wouldn't you know it: somethings busted.

Initialized empty Git repository in /home/data/git/cdo/org.eclipse.emf.cdo.git/
....
Delta compression using up to 8 threads.
Compressing objects: 100% (16879/16879), done.
Writing objects: 100% (46999/46999), done.
Total 46999 (delta 24796), reused 35409 (delta 18316)
Removing duplicate objects: 100% (256/256), done.
Unknown: error

I love those kind of descriptive messages.

I've re-initialized the repo and run your fast import command and it seems happy.  Can you confirm?

-M.
Comment 16 Eike Stepper CLA 2011-01-12 11:54:11 EST
(In reply to comment #15)
> I've re-initialized the repo and run your fast import command and it seems
> happy.  Can you confirm?

Excellent!! It seems all good now. Please mark the CVS read-only now (if you haven't done it already). From my side this bug can be closed now.

Thank you, I'm looking forward to experience the benefits of Git ;-)
Comment 17 Eclipse Webmaster CLA 2011-01-12 14:04:15 EST
Ok I'll close out this bug.  I've set a reminder to clean up the CVS repo in 6 months.

-M.
Comment 18 Eike Stepper CLA 2011-01-16 06:10:11 EST
For future reference:

I had to execute this command after your import manually:

git config --bool core.bare true
Comment 19 Caspar D. CLA 2011-01-17 03:49:44 EST
Something seems to be slightly wrong with the access rights..
My pushes go through, but apparently I or the
process handling the push can't update the server-side log
file:

# git push
Password: 
Counting objects: 23, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (12/12), 842 bytes, done.
Total 12 (delta 6), reused 0 (delta 0)
error: Unable to append to ./logs/HEAD: Permission denied
To ssh://cdegroot@git.eclipse.org/gitroot/cdo/org.eclipse.emf.cdo.git
   ad9439e..a98f36d  master -> master

# git push
Password: 
Everything up-to-date

# git config -l
user.name=Caspar De Groot
user.email=caspar_d@nomagicasia.com
color.diff=auto
color.status=auto
color.branch=auto
core.repositoryformatversion=0
core.filemode=true
core.logallrefupdates=true
core.autocrlf=false
core.bare=false
remote.origin.url=ssh://cdegroot@git.eclipse.org/gitroot/cdo/org.eclipse.emf.cdo.git
remote.origin.fetch=+refs/heads/master:refs/remotes/origin/master
branch.master.remote=origin
branch.master.merge=refs/heads/master
Comment 20 Eclipse Webmaster CLA 2011-01-17 10:26:11 EST
Hmm, looks like Martins checkin set a bad perm mode on the log file.  I've scripted a updated to the repo so all of the required files should be writable.

-M.
Comment 21 Eike Stepper CLA 2011-01-17 10:30:25 EST
After all, we're not very happy especially with EGit. The team decided to switch from CVS to SVN until EGit (and all the other Git integrations like Bucky/Git and Mylyn/Git) is really usable. 

Currently we're playing with a self-made CVS->Git migration. I'll open a separate bugzilla when we're sure we want to go that route.
Comment 22 Eike Stepper CLA 2011-01-17 10:31:32 EST
Created attachment 186912 [details]
Bucky's RMAP for Git (for future reference)