rlktradewright/vss2git

VSS Project structure is part of the git repository

Opened this issue · 4 comments

When I convert the following VSS project 
           $/Services/MCHostService/WORKING/ 
to the following folder 
           D:\Projects\Git\Migration\MCHostService 
this generates first the VSS project parent structure under the git folder so I 
get at the end following git structure 
           D:\Projects\Git\Migration\MCHostService\.git 
          
 D:\Projects\Git\Migration\MCHostService\Services\MCHostService\WORKING 

It makes however (at least for us) to keep in the git repository the parent 
structure "Services\MCHostService\WORKING", or 
this would make eventually sense if Vss2Git would define sub-modules. In this 
case we would generate directly the different projects into 
"D:\Projects\Git\Migration" so all would share again the same structure. 

I saw that in the Vss2Git discussion that there was already a similar request. 
Is there in the mean time any way to have the file structure 
           $/Services/MCHostService/WORKING/<ProjectFileStructure> 
directly converted into the following folder 
           D:\Projects\Git\Migration\MCHostService\<ProjectFileStructure> 

If this is not possible we will have to manually move than all files to the 
root folder and commit the changes


What version of the product are you using? 1.0.10

On what operating system? Windows XP SP3

Please provide any additional information below.


Original issue reported on code.google.com by jacques....@besi.com on 20 Jul 2012 at 6:11

Comment from Trevor Robinson, 9th May 2012
As I understand, you want the VSS project root to be stripped from the output 
path. This does seem useful for migration of modules into separate Git 
repositories. I'll keep it in mind next time I'm able to work on Vss2Git, or if 
you'd like to submit a patch, that may speed things up.

Original comment by jacques....@besi.com on 20 Jul 2012 at 6:11

A workaround is to use the git filter-branch command. See: 
http://git-scm.com/book/en/Git-Tools-Rewriting-History

Original comment by p.b.o...@gmail.com on 29 Oct 2012 at 2:32

I found that the following commit resolves this issue. I cherry picked this 
commit and retried the import with great success. Perhaps consider importing 
this commit into the master?

Author:     Remigius Stalder <remigius.stalder@descom-consulting.ch>
Author date:    1 year ago (Tue Feb 07 09:42:56 2012)
Committer:  Trevor Robinson <trevor@scurrilous.com>
Commit date:    1 year ago (Thu Feb 16 10:19:21 2012)
Commit hash:    37fbf150c07c373adebce0aba9300735f307418f
Children:   cb7c6ba992
Parent(s):  a712896b8a

use relative path below the selected VSS subproject

Original comment by day...@gmail.com on 14 Jun 2013 at 8:27

I have been splitting my entire VSS repository up into separate GitHub repos by 
using the new(ish) "git subtree split" command to effectively "move" the 
structure from $/Folder/Folder back to $/. Here are the steps I've used:-

1] Use vss2git to import the folder $/Folder/Project into a temporary Git repo.

2] Use "git subtree split --prefix" to create a separate branch (split) with 
the files at the root, e.g.

git subtree split --prefix=Folder/Project -b split

3] Push the branch into master on the intended repo, e.g.

git push //server/Git/project split:master --tags

The following articles are what put me in touch with this git command:-

http://makingsoftware.wordpress.com/2013/02/16/using-git-subtrees-for-repository
-separation/

http://log.pardus.de/2012/08/modular-git-with-git-subtree.html

Original comment by chrisold...@gmail.com on 27 Oct 2013 at 9:21