bastos71230 Posted February 25, 2017 Report Share Posted February 25, 2017 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 More sharing options...
bastos71230 Posted February 27, 2017 Author Report Share Posted February 27, 2017 I solved this using graphic interface instead of command lines : in te branch explorer of your repo -> right click on main branch (I renamed it "master" just in case) -> Sync with git That worked fine for me, it keeps all the history. Link to comment Share on other sites More sharing options...
calbzam Posted February 27, 2017 Report Share Posted February 27, 2017 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 More sharing options...
redwards Posted March 13, 2018 Report Share Posted March 13, 2018 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 More sharing options...
calbzam Posted March 14, 2018 Report Share Posted March 14, 2018 You can use in your script the "cm find branch --format={name}" to list the branch names and then the "cm renamebranch --help" to rename the branches based on your needs. Regards, Carlos. Link to comment Share on other sites More sharing options...
wnicholls Posted May 2, 2018 Report Share Posted May 2, 2018 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.