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

Bug 450680

Summary: Git migration request
Product: Community Reporter: Dave Russo <d-russo>
Component: GitAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: denis.roy, sascha
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dave Russo CLA 2014-11-08 18:05:55 EST
- migration timeline
As soon as possible after Nov 9.  We like to cut over on or before Nov 14.  

Once the git repos are created, we'll need a couple of days to configure and test that our local tooling works with git.

- your decision regarding existing code (archive or import)
   Please import the corresponding portions as shown below

- mapping of current code to new Git repos
   If possible I'd like map the 5 SVN directories shown below to 5 separate git 
   repos:
     o org.eclipse.rtsc.xdccore.git   ->
         svnroot/technology/org.eclipse.rtsc/xdc/xdccore
     o org.eclipse.rtsc.training.git  ->
         svnroot/technology/org.eclipse.rtsc/training/ec2009
     o org.eclipse.rtsc.contrib.git   ->
         svnroot/technology/org.eclipse.rtsc/contrib/targets
     o org.eclipse.rtsc.test.git      ->
         svnroot/technology/org.eclipse.rtsc/test
     o org.eclipse.rtsc.committer.git ->
         svnroot/technology/org.eclipse.rtsc/committer/rf/pure

- A description for each of your repositories
   org.eclipse.rtsc.xdccore.git   - Main RTSC repo
   org.eclipse.rtsc.training.git  - Tutorial and training materials
   org.eclipse.rtsc.contrib.git   - Contributed target and platform support
   org.eclipse.rtsc.test.git      - Regression test suite
   org.eclipse.rtsc.committer.git - Experimental forks of the RTSC tools
Comment 1 Eclipse Webmaster CLA 2014-11-12 09:59:37 EST
Ok Ive run an initial import of all of these which you can find here: http://git.eclipse.org/c/rtsc .  Can you confirm they are as you expect them to be(tags,branches etc).  Once you're happy with the import I'll run it one last time and set the descriptions.

-M.
Comment 2 Dave Russo CLA 2014-11-12 10:29:01 EST
I did a quick check of org.eclipse.rtsc.xdccore.git and noticed that the SVN tags don't convert to git tags.  Is it possible to for the tags in the SVN repo to become tags in git?
Comment 3 Eclipse Webmaster CLA 2014-11-12 11:58:56 EST
we use svn2git to run the import, but it's possible it's having issues.  I'll try updating it and re-running the import.

-M.
Comment 4 Eclipse Webmaster CLA 2014-11-12 13:48:01 EST
Ok the re-import has finished and can be found in the same place.  Is it better than the previous version?

-M.
Comment 5 Dave Russo CLA 2014-11-12 16:28:34 EST
hummmm .... still no tags.  In fact, it's slightly worse: the first import contained master and a single branch, the second only has the master branch.

I've never used svn2git, but is sounds like it should work provided it can find the tag, branches, trunk directories.  We do maintain several "projects" in a single repo and, as a result, we do have multiple directories with trunk, branches, and tags.  But I expected that by starting from, say, svnroot/technology/org.eclipse.rtsc/xdc/xdccore svn2git would treat this as a "standard" SVN repo.
Comment 6 Dave Russo CLA 2014-11-14 21:00:47 EST
Can you share the svn2git command used to convert, say, svnroot/technology/org.eclipse.rtsc/xdc/xdccore?

The --no-minimize-url option seems necessary for the way the RTSC SVN repo is organized.  So, I would expect the following to work:

    svn2git https://dev.eclipse.org/svnroot/technology/org.eclipse.rtsc/svnroot/technology/org.eclipse.rtsc/xdc/xdccore --no-minimize-url
Comment 7 Eclipse Webmaster CLA 2014-11-17 14:24:09 EST
The default command is:

svn2git file://path/to/repo --no-minimize-url $excludelist

Currently excludelist is an empty string.

After comment 5 I tried adding a few different values for 

--trunk 
--tags
--branches

To see if that improved the resulting repository, but it doesn't look like it has.

-M.
Comment 8 Dave Russo CLA 2014-11-17 14:42:01 EST
The svn2git README says that to import a "nested project" one should use:
    svn2git http://svn.example.com/path/to/repo/nested_project --no-minimize-url

So, by "file://path/to/repo" do you mean 
    "https://dev.eclipse.org/svnroot/technology/org.eclipse.rtsc/svnroot/technology/org.eclipse.rtsc" 
or
    "https://dev.eclipse.org/svnroot/technology/org.eclipse.rtsc/svnroot/technology/org.eclipse.rtsc/xdc/xdccore"?

It doesn't seem like it should matter but ...
Comment 9 Eclipse Webmaster CLA 2014-11-17 14:53:33 EST
No I mean  file:///svnroot/technology/org.eclipse.rtsc/svnroot/technology/org.eclipse.rtsc/xdc/xdccore

The imports are run on a machine with access to the file system the repository is stored in.

-M.
Comment 10 Dave Russo CLA 2014-11-17 17:54:55 EST
sorry, I meant the "xdc/xdccore" suffix rather than the URI scheme prefix.  

It looks like svn2git doesn't like the RTSC repo for some reason.  Is there any log or verbose mode that can be used?  I'm at a loss to suggest alternatives without some hints from the tool.

As far as I know, we followed "standard" SVN practice in terms of the layout of the repo.  The only deviation I can think of is that we created a sub-directory, named "weekly", in the tags directory.  Has any other SVN->GIT conversion had problems?
Comment 11 Eclipse Webmaster CLA 2014-11-18 10:15:52 EST
The tool tends to be a little verbose, and while I don't tend to record the output I don't recall seeing any 'errors' scroll by.

In the rare cases of issues with the import projects either choose to 'live with it' or to try another method of conversion (possibly using git svn ) and then just upload the results.

At this stage I can see a couple of options

1) we can try git svn and see if it's 'better'
2) we can try to dump and filter the xdccore part of the SVN repo into a standalone repo and then convert that. If that works we could repeat it with the other parts.

The catch with #2 is that I've found the SVN dump and filter tools don't handle deletions or renames within the repository well.

-M.
Comment 12 Dave Russo CLA 2014-11-18 10:46:17 EST
I'd like to try the svn dump option on xdccore.  

If this doesn't work, I think "git svn" will be ok; with some work, I might be able to script the creation of real tags from the svn ids and the git-svn "tags branches".

Also, can you mail me the output log of the svn2git?  I'm hoping there will be a hint about how our repo might be confusing svn2git.  I'd be happy to make changes to the repo if necessary.

BTW: thanks for your help, I should have known this was not going to be simple.
Comment 13 Eclipse Webmaster CLA 2014-12-03 09:16:39 EST
Ok, I've filtered the xdccore data out of the main repo and have converted just that into a git repo: https://git.eclipse.org/c/rtsc/org.eclipse.rtsc.xdccore/ , but I still don't think it's what's expected.

-M.
Comment 14 Dave Russo CLA 2014-12-03 21:23:48 EST
Yep, same problem: the branches and tags are missing.

I think we can recover the tags without much work, but the branches are important.  Can we try the processes without the tags?  I'm hoping that the large number of tags is causing the issue.

If this doesn't work, then the dump you had before (with all branches and tags as copies) can be manually fixed up (by deleting the tags directory, moving trunk/src to ./src, ...).  The downside is that existing branches are not attached to master, but at least they would be available.
Comment 15 Eclipse Webmaster CLA 2014-12-09 13:38:19 EST
Ok I've re-run the import(from the main RTSC repo) with the --notags flag for XDCCore.  It should be available at the same URL as before.

-M.
Comment 16 Sasha Slijepcevic CLA 2015-01-14 18:11:31 EST
The link https://git.eclipse.org/c/rtsc/org.eclipse.rtsc.xdccore/ still displays "No repository found", while https://git.eclipse.org/c/rtsc.back/org.eclipse.rtsc.xdccore/ contains content from 5 weeks ago. When is https://git.eclipse.org/c/rtsc/org.eclipse.rtsc.xdccore/ going to track the actual content of the Git repository? Is svn repository still being converted?
Comment 17 Denis Roy CLA 2015-01-15 10:31:54 EST
I'm not sure where in the process this is at -- but the rtsc container is not yer world-readable, and the rtsc.back is... If the migration is complete, we'll remove the "rtsc.back" container and make rtsc world-readable.
Comment 18 Eclipse Webmaster CLA 2015-01-15 10:58:13 EST
I've fixed the permissions and removed rtsc.back as it was created while testing other import options.

The new RTSC Git URLs are:

ssh://committer_id@git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.committer.git
ssh://committer_id@git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.contrib.git
ssh://committer_id@git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.test.git
ssh://committer_id@git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.training.git
ssh://committer_id@git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.xdccore.git

I think we're done here.

-M.
Comment 19 Sasha Slijepcevic CLA 2015-01-15 14:32:35 EST
https://git.eclipse.org/c/rtsc/org.eclipse.rtsc.xdccore.git/ is working for me now. The link at the bottom of that page - http://git.eclipse.org/gitroot/rtsc/org.eclipse.rtsc.xdccore.git, seems broken though.