Jump to content

Fast Export / Import to Git


bastos71230

Recommended Posts

Hi there !

I would like to export a repository from Plastic SCM and import it to a git Repo.

I did an export with 

$ cm fast-export repo@XXX.XXX.XXX.XXX:XXXX repo.fe.01

The file repo.fe.01 was well created (see attachment), then I do this into my new git repository: 

$ cat repo.fe.01 | git fast-import --force --stats

But here is the error output : 

fatal: Branch name doesn't conform to GIT standards: refs/heads/master-Mise en place notifs push
fast-import: dumping crash report to .git/fast_import_crash_9708

So I tried to normailize all my branches names (see attachment repo.fe.01.NEW) but then here is the new error output : 

fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_10168

 

Any Ideas ?

Regards

Link to comment
Share on other sites

Hello,

We've been testing and the fact is that Git doesn't support branches with spaces in the name. 

So I guess that the only solution is renaming all your Plastic SCM having spaces.

By the way, do you know our GitSync and GitServer features? Those are more advanced features when we need to sync git-plastic repositories or work with mixed environments:

https://www.plasticscm.com/features/plasticscm-for-git-users.html

Regards,

Carlos.

Link to comment
Share on other sites

  • 1 year later...
On 2/27/2017 at 4:04 AM, calbzam said:

Hello,

We've been testing and the fact is that Git doesn't support branches with spaces in the name. 

So I guess that the only solution is renaming all your Plastic SCM having spaces.

Is there an automated way to do this? Using a script perhaps? Or a way to find all the branches with spaces?

Link to comment
Share on other sites

  • 1 month later...

I'll just add to this that labels have the same problem.  I just had to rename a bunch of labels to take spaces out but it was  easy enough to do in the GUI, fortuanately.  Rules for naming references in GIT are (currently) documented here https://git-scm.com/docs/git-check-ref-format
It would be nice if cm fast-export could have highlighted this problem,  instead of producing an invalid, unloadable file. Or make Plastic automatically escape it somehow, but if it does, you'll have to deal with GitSync and gitserver and make sure the rules exactly match, or there will be problems down the track with them.. ones not so easy to fix.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...