Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333142 - Git migration request for emf.compare
Summary: Git migration request for emf.compare
Status: CLOSED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 333059
  Show dependency tree
 
Reported: 2010-12-23 06:00 EST by Cedric Brun CLA
Modified: 2011-03-07 12:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Brun CLA 2010-12-23 06:00:20 EST
The EMF Compare project would like to migrate from CVS to git, the cvs repository is /cvsroot/modeling and the module org.eclipse.emf/org.eclipse.emf.compare*/**

We would like to create a single git repo org.eclipse.emf.compare.git containing all the org.eclipse.emf.compare/**/* content, and then we will restructure the internal layout.

migration timeline : the sooner the better, we would like to have a bit of time to make sure the build will be perfect for Helios SR2 by the end of february, which mean a migration taking place in january looks perfect to us. Please tell us if you think it's not doable before february and then we'll consider a later migration.

mapping of current code to new Git repos : 
All the current code in a single repo :)

your decision regarding existing code (archive or import) :
We would like to import the existing code and it would be more comfortable for us if you do the process.

A description for each of your repositories. The description will be seen in the web view: http://git.eclipse.org/c/ :
"EMF Compare git repository"
Comment 1 Eclipse Webmaster CLA 2011-01-03 14:47:25 EST
I've created the initial repo.

With regards to the import: the import tooling can only handle one cvs module, there isn't any wildcard support.  So you'll either need to 'tag' all of the code you want (and then import based on that tag), or we'll need to unify the code in CVS and then import it.  If you'd like to work on the import side of things(so you don't have to wait for us) here's a basic command to get you started:

git-cvsimport -v -i -p -x -d :local:/cvsroot/modeling org.eclipse.emf/org.eclipse.emf.compare -C /gitroot/emfcompare/org.eclipse.emf.compare.git

And you can edit the 'description' file in /gitroot/emfcompare/org.eclipse.emf.compare.git to set the details displayed on git.eclipse.org.

-M.
Comment 2 Cedric Brun CLA 2011-01-05 05:58:00 EST
The org.eclipse.emf/org.eclipse.emf.compare.releng module is old, no more used and it's history provides little value, so we'll just drop it.

I did type :
/usr/local/libexec/git-core/git-cvsimport -v -i -p -x  -d :local:/cvsroot/modeling org.eclipse.emf/org.eclipse.emf.compare -C /gitroot/emfcompare/org.eclipse.emf.compare.git


A few minutes later I have a repository which I can clone on my laptop with 

git clone ssh://cbrun@git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare.git

Though I noticed the git.eclipse.org repository is not a *bare* repository, I have a .git in it. That mean I can't push my changes (git complains because the local files might be out-dated then)

Looking to the other repositories they are all *bare* ones and don't have .git


I did transformed the CVS imported non-bare repository with 

git clone --bare org.eclipse.emf.compare.git org.eclipse.emf.compare.git-bare

and then renamed   org.eclipse.emf.compare.git-bare in org.eclipse.emf.compare.git

Everything looks fine now I'm just wondering if I did something wrong or if the documentation should be updated somewhere.
Comment 3 Eclipse Webmaster CLA 2011-01-05 14:05:37 EST
I don't think you did anything 'wrong'(since it seems to be working for you), so it's possible the docs are a little out of date.

-M.
Comment 4 Cedric Brun CLA 2011-01-06 03:58:25 EST
Everything works perfectly. I'll update the wiki accordingly to what I did.


Thanks !
Comment 5 Denis Roy CLA 2011-01-06 09:21:14 EST
> Though I noticed the git.eclipse.org repository is not a *bare* repository, I
> have a .git in it.


FWIW, to avoid having org.eclipse.abc.git/.git, when performing a cvs import, I typically define the GIT_DIR environment variable as org.eclipse.abc.git, then specify-C  as the "container" directory: /gitroot/containername/


Your way:  GIT_DIR=null
           -C /gitroot/containername/org.eclipse.abc.git


My way:    GIT_DIR=org.eclipse.abc.git
           -C /gitroot/containername/


Both methods work, so this is just a matter of preference.
Comment 6 Denis Roy CLA 2011-01-06 09:23:32 EST
(In reply to comment #4)
> Everything works perfectly. I'll update the wiki accordingly to what I did.

Did you update documentation anywhere?  The usage of GIT_DIR is explained here:

   http://wiki.eclipse.org/Git/Migrating_to_Git#Using_git-cvsimport
Comment 7 Cedric Brun CLA 2011-01-06 09:27:51 EST
I did try with the GIT_DIR variable too and had some errors at some point.. I can't recall exactly what the issues were..  If you're ok I'll just add a paragraph in the doc explaining how to transform a "non bare" to a "bare" repository.
Comment 8 Cedric Brun CLA 2011-03-07 11:13:03 EST
Reopening as I have a strange issue...

So far everything was working well, but today I want to push my changes and I get :

Counting objects: 114, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (45/45), done.
Writing objects: 100% (65/65), 11.39 KiB, done.
Total 65 (delta 36), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objects

fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To ssh://cbrun@git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://cbrun@git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare'

Is there any ongoing issue with git.eclipse.org ?
Comment 9 Eclipse Webmaster CLA 2011-03-07 11:31:25 EST
Not that I know of.

Your permissions look good:

>/gitroot/emfcompare/org.eclipse.emf.compare.git # ls -Fla | grep obj
drwxrwsr-x 152 cbrun modeling.emf.compare 3648 Mar  7 11:05 objects/
>

Inside the objects directory I only see one 'file' that looks odd:
drwxr-sr-x   2 pkonemann modeling.emf.compare  104 Feb  2 13:51 51/

So I made it rwxrwsr-x .

Outside of that as you 'own' these files I would expect you to be able to read/write as you see fit.

-M
Comment 10 Denis Roy CLA 2011-03-07 11:34:51 EST
(In reply to comment #9)
> Inside the objects directory I only see one 'file' that looks odd:

Matt, when you create a repository, don't forget to make it shared in the repo's config file:

dev3:/gitroot/emfcompare/org.eclipse.emf.compare.git # cat config 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
        sharedrepository = 1   <=== Add this
Comment 11 Denis Roy CLA 2011-03-07 11:35:38 EST
To be clear, I've added sharedrepository = 1 to the repo for this case.  My previous comment was an FYI.
Comment 12 Cedric Brun CLA 2011-03-07 12:02:43 EST
It works now, thanks for the tip !