Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325750

Summary: Git migration request
Product: Community Reporter: Paul Webster <pwebster>
Component: GitAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, caniszczyk, djo, d_a_carver, john.arthorne, kim.moir, Mike_Wilson
Version: unspecifiedFlags: john.arthorne: pmc_approved+
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Paul Webster CLA 2010-09-20 09:10:58 EDT
In E4 we'd like to begin our migration to git by migrating one sub-component.  Deeplinking.  I think they turn into 2 git repos:

/cvsroot/eclipse:
e4/org.eclipse.e4.deeplink
e4/org.eclipse.e4.utils

I'd like to include their history and turn them into git repos.  Then we'll delete their CVS repositories.  If the basic git e4 holder is created, I'm willing to take a stab at generating the git repos from them, a la http://wiki.eclipse.org/Git/Migrating_to_Git.  Would a location for the e4 project be git://git.eclipse.org/e4

The team responsible for this subcomponent doesn't regularly have access to SSH, and has also requested that these repos have "commit access over https" enabled.

PW
Comment 1 Denis Roy CLA 2010-09-27 11:36:49 EDT
I've created /gitroot/e4 for you.  When you're done your import, we can work together to disable your CVS and enable commits over https.
Comment 2 Paul Webster CLA 2010-09-28 09:49:38 EDT
I'm following the instructions on http://wiki.eclipse.org/Git/Migrating_to_Git#Using_git-cvsimport

#2 ssh to dev.eclipse.org, and make sure you're using node5 (ssh node5 if needed) 

pwebster@dev1:~> ssh node5
ssh: connect to host node5 port 22: No route to host

PW
Comment 3 Denis Roy CLA 2010-09-28 11:33:28 EDT
I've updated the instructions.
Comment 4 Paul Webster CLA 2010-09-28 12:20:36 EDT
Just a note, git.eclipse.org first took me to dev1, which didn't work.  Then when I went back it took me to dev2, which did work (since dev2 has cvsps installed)

PW
Comment 5 Paul Webster CLA 2010-09-28 12:30:44 EDT
I've updated the wiki.

I've also generated r/w git repos for org.eclipse.e4.deeplink and org.eclipse.e4.utils that are available:

git://git.eclipse.org/gitroot/e4/org.eclipse.e4.utils.git
git://git.eclipse.org/gitroot/e4/org.eclipse.e4.deeplink.git

I just need to figure out how to build them :-)


PW
Comment 6 Dave Orme CLA 2010-10-06 16:04:37 EDT
(In reply to comment #5)
> I've updated the wiki.
> 
> I've also generated r/w git repos for org.eclipse.e4.deeplink and
> org.eclipse.e4.utils that are available:
> 
> git://git.eclipse.org/gitroot/e4/org.eclipse.e4.utils.git
> git://git.eclipse.org/gitroot/e4/org.eclipse.e4.deeplink.git
> 
> I just need to figure out how to build them :-)

Thanks Paul!

I just came over to do this and found you'd done it.  Now to get git working through our firewall...
Comment 7 Dave Orme CLA 2010-10-06 17:25:57 EDT
Denis,

I was able to checkout via https, make a few changes and commit them locally.  But when I try to push I get an error saying:

Transport error occurred during push operation "git-receive-pack not permitted"

Does this mean I somehow messed things up or does it mean that the repo is not yet configured to permit push over HTTPS (per original request)?

(I'm using the latest EGit tooling.)

Thanks for your assistance.
Comment 8 Dave Orme CLA 2010-10-07 17:08:24 EDT
Verified consistent behavior today using MSysGit.  

Good news: I can clone/pull/push using SSH (when I'm off the VPN).

Remaining challenge: https through the proxy checks out, but not back in--even when I carefully type my password and verify my password via portal.eclipse.org.
Comment 9 Denis Roy CLA 2010-10-12 11:21:29 EDT
We don't enable pushes through https by default.  Can you confirm you want them on all of /gitroot/e4?
Comment 10 Dave Orme CLA 2010-10-12 11:43:17 EDT
(In reply to comment #0)
> The team responsible for this subcomponent doesn't regularly have access to
> SSH, and has also requested that these repos have "commit access over https"
> enabled.

Yes, please.  Paul, any additional comments?

Thanks in advance.
Comment 11 Paul Webster CLA 2010-10-12 12:14:58 EDT
(In reply to comment #9)
> We don't enable pushes through https by default.  Can you confirm you want them
> on all of /gitroot/e4?

Hi Denis,

I'd only like this enabled on these 2 components, if at all possible:

/gitroot/e4/org.eclipse.e4.deeplink.git
/gitroot/e4/org.eclipse.e4.utils.git

PW
Comment 12 Denis Roy CLA 2010-10-12 13:48:05 EDT
I have enabled just those two git repos for pushes via https.  Let me know if it doesn't work.
Comment 13 Dave Orme CLA 2010-10-12 17:58:22 EDT
Tested/works.  Thanks much Denis!

I've noticed that so far all of my commits are going to the 'master' branch and the 'origin' branch is still sitting back where PW left it.  Is this right?  A search of the 'net seems to indicate that I should normally be working from 'master', but then what's 'origin' for?

Links to references are welcome.

Thanks again, Denis and Paul.  This bug can be closed now (but I would appreciate a pointer to the explanation I seem to be not finding).
Comment 14 David Carver CLA 2010-10-12 18:38:27 EDT
(In reply to comment #13)
> Tested/works.  Thanks much Denis!
> 
> I've noticed that so far all of my commits are going to the 'master' branch and
> the 'origin' branch is still sitting back where PW left it.  Is this right?  A
> search of the 'net seems to indicate that I should normally be working from
> 'master', but then what's 'origin' for?
> 
> Links to references are welcome.
> 
> Thanks again, Denis and Paul.  This bug can be closed now (but I would
> appreciate a pointer to the explanation I seem to be not finding).

Ideall, origin/origin should not even ben in the repo.  All the items that are coming into origin/origin need to go into the master branch.   As it is right now, master is created once, but origin/origin is the one that gets updated during every synch.  It is just confusing and completely different from every other git repo out there.
Comment 15 Denis Roy CLA 2010-10-12 19:06:59 EDT
>It is just confusing and completely different from every
> other git repo out there.

You keep telling me this, yet I still don't know how to fix it.
Comment 16 Paul Webster CLA 2010-10-12 19:42:11 EDT
(In reply to comment #14)
> Ideall, origin/origin should not even ben in the repo.  All the items that are
> coming into origin/origin need to go into the master branch.

In our case, origin/origin is a side effect of the CVS import tool we used.  But since we're not syncing to CVS any more origin/master is the one we should use and I'll delete origin/origin shortly.

When I confirm I can build I'll work with Denis to get rid of the matching CVS repos.

PW
Comment 17 David Carver CLA 2010-10-12 20:10:03 EDT
(In reply to comment #15)
> >It is just confusing and completely different from every
> > other git repo out there.
> 
> You keep telling me this, yet I still don't know how to fix it.

Denis if you have your script posted somewhere, we can take a look at it and see if we can figure out why it goes to origin/origin.

I just used git-svn recently to clone an svn repo into git, and it correctly goes into master.

Anyways, and Paul said, if the initial conversion is done, they can merge from origin/origin into master, and then delete origin/origin.
Comment 18 Dave Orme CLA 2010-10-12 21:14:13 EDT
(In reply to comment #16)
> (In reply to comment #14)
> > Ideall, origin/origin should not even ben in the repo.  All the items that are
> > coming into origin/origin need to go into the master branch.
> 
> In our case, origin/origin is a side effect of the CVS import tool we used. 
> But since we're not syncing to CVS any more origin/master is the one we should
> use and I'll delete origin/origin shortly.
> 
> When I confirm I can build I'll work with Denis to get rid of the matching CVS
> repos.

Thanks PW, DC, and Denis for the excellent explanations.  

So I'll just ignore 'origin' and expect it to disappear at the "right" time.  If I'm misunderstanding, please shout now.  I'll take silence as, "You got that, dude."

Thanks again to Denis and PW for all the help/work setting this up.
Comment 19 Denis Roy CLA 2010-10-13 08:36:36 EDT
> Denis if you have your script posted somewhere, we can take a look at it and
> see if we can figure out why it goes to origin/origin.

The e4 repos were imported by Paul.  When I import I simply use:

git-cvsimport -v -i -p -x -d :local:/home/data2/cvs/eclipse e4/(directory) -C $TARGETDIR/$i
Comment 20 Dave Orme CLA 2010-10-16 21:44:25 EDT
I'd like to request that org.eclipse.e4.installer be migrated to Git also (and be made writable over HTPS).  The code itself is dead, but we'd like to migrate the API to P2, and so would like access to the code.

Thanks in advance.
Comment 21 Paul Webster CLA 2010-10-17 08:11:37 EDT
(In reply to comment #20)
> I'd like to request that org.eclipse.e4.installer be migrated to Git also (and
> be made writable over HTPS).  The code itself is dead, but we'd like to migrate
> the API to P2, and so would like access to the code.

I've made it available as 
git://git.eclipse.org/gitroot/e4/org.eclipse.e4.installer.git

PW
Comment 22 David Carver CLA 2010-10-18 01:01:36 EDT
(In reply to comment #19)
> > Denis if you have your script posted somewhere, we can take a look at it and
> > see if we can figure out why it goes to origin/origin.
> 
> The e4 repos were imported by Paul.  When I import I simply use:
> 
> git-cvsimport -v -i -p -x -d :local:/home/data2/cvs/eclipse e4/(directory) -C
> $TARGETDIR/$i

I think you need to specify the -o option:

-o <branch-for-HEAD>
When no remote is specified (via -r) the HEAD branch from CVS is imported to the origin branch within the git repository, as HEAD already has a special meaning for git. When a remote is specified the HEAD branch is named remotes/<remote>/master mirroring git-clone behaviour. Use this option if you want to import into a different branch.
Use -o master for continuing an import that was initially done by the old cvs2git tool.

So with out specify this, it will default to orgin/origin, in our case, I think we want to specify:

-o master

Which will make all changes and syncs from HEAD go into the master branch.

http://linux.die.net/man/1/git-cvsimport
Comment 23 Paul Webster CLA 2010-10-18 12:13:02 EDT
(In reply to comment #22)
> -o master
> 

Thanx Dave, I've added that to the line on http://wiki.eclipse.org/Git/Migrating_to_Git#Using_git-cvsimport

PW
Comment 24 Paul Webster CLA 2010-10-18 12:18:06 EDT
Thanx Denis.  I think the main work of this bug is done.  I've opened bugs for other aspects and I'll open new bugs for any new work.

bug 328048
bug 328049

PW
Comment 25 Denis Roy CLA 2010-11-10 13:33:43 EST
Thanks, Dave.  I'll look into those options for the git mirrors too.