Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
My question is fairly simple: we have some svn repo's hosted on Forge. Since git client has been integrated into CODESYS IDE (yay!), we wish to migrate to git and use that SCM henceforth.
With migration I mean that the svn data including history is converted into git (with history)
Has anybody of you ever needed to do this? If so, how did you achieve this task?
So what software / tools did you use?
I hope to hear from you all
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only way to migrate is the following:
Check out revision from SVN and then commit that state to Git. And this for each revision you want to have in Git.
Once the Git scripting interface is ready, you can script the migration if necessary.
But we have no release date for this.
Background:
The formats of the data stored in Git and SVN are not compatible. So a direct migration from SVN to Git is not possible.
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not ideal but it is an option ;-)
Anyway, I feel a migration script, courtesy of CODESYS, coming up in due time.
It should do this tedious manual labour intensive task fully automated.
Give the script a source SVN, destination git and the proper credentials and let her rip.
Last edit: h-hermsen 2021-09-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After piecewise converting some repo's by hand I can surely say that a kind of automated tool would be highly advisable. I hope codesys will provide us a burnerplate python script for this as soon as you guys have released the python scripting api. Converting by hand takes loads of manual labour.
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
so there is an "anything older than today is found in SVN" solution. This makes sense from an effort point of view, but there are advantages to converting your entire history to git. lets use lib/cobolt/ as an example.
Now the lib/cobolt/ SVN has something like 1000 revisions. This is 6 things:
.library
example.project
unittest.project
binary .project and. library files as duplications of those three
some images for the project website
some readmes and licenses
so what can be automated currently is:
checking out every revision, and disconnecting the .project and .library from SVN.
but then the manual steps are:
Then some effort is required to identify, what was changed in each revision, and to which git repository those changes should end up in. Perhaps some could be automated, but you would have to program the assumptions.
The binaries, images and readme files are relatively light work. Some of the binaries are still connected to SVN at the old /prj/mqttsparkplugb/ url, but the decision is made to preserve the binaries as they were committed.
now to get the first revision of each cds project/library into git is easy, but manual. you just git initialize the disconnected project, commit all (manually copying the commit message, manually copying the commiter details) add a git remote and push.
Now for the next commit, you find the next relevant commit, you do a project compare (to the project revision you checked out from SVN and disconnected earlier), accept all the changes, commit all (manually copying the commit message and conmitter details) and push.
Tags to be added using git bash.
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to chime in that various steps
during this process are very cpu intensive and caused CODESYS to sometimes slow down beyond workable or crash. Especially during Project compare phase.
Last edit: h-hermsen 2021-10-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody!
My question is fairly simple: we have some svn repo's hosted on Forge. Since git client has been integrated into CODESYS IDE (yay!), we wish to migrate to git and use that SCM henceforth.
With migration I mean that the svn data including history is converted into git (with history)
Has anybody of you ever needed to do this? If so, how did you achieve this task?
So what software / tools did you use?
I hope to hear from you all
Hi,
The only way to migrate is the following:
Check out revision from SVN and then commit that state to Git. And this for each revision you want to have in Git.
Once the Git scripting interface is ready, you can script the migration if necessary.
But we have no release date for this.
Background:
The formats of the data stored in Git and SVN are not compatible. So a direct migration from SVN to Git is not possible.
It's not ideal but it is an option ;-)
Anyway, I feel a migration script, courtesy of CODESYS, coming up in due time.
It should do this tedious manual labour intensive task fully automated.
Give the script a source SVN, destination git and the proper credentials and let her rip.
Last edit: h-hermsen 2021-09-23
Currently one of three svn repo's is converted.
After piecewise converting some repo's by hand I can surely say that a kind of automated tool would be highly advisable. I hope codesys will provide us a burnerplate python script for this as soon as you guys have released the python scripting api. Converting by hand takes loads of manual labour.
Please let us take part. Because the solution sounds fairly simple. What did you need to do manually, and is so much work?
so there is an "anything older than today is found in SVN" solution. This makes sense from an effort point of view, but there are advantages to converting your entire history to git. lets use lib/cobolt/ as an example.
Now the lib/cobolt/ SVN has something like 1000 revisions. This is 6 things:
so what can be automated currently is:
but then the manual steps are:
Then some effort is required to identify, what was changed in each revision, and to which git repository those changes should end up in. Perhaps some could be automated, but you would have to program the assumptions.
The binaries, images and readme files are relatively light work. Some of the binaries are still connected to SVN at the old /prj/mqttsparkplugb/ url, but the decision is made to preserve the binaries as they were committed.
now to get the first revision of each cds project/library into git is easy, but manual. you just git initialize the disconnected project, commit all (manually copying the commit message, manually copying the commiter details) add a git remote and push.
Now for the next commit, you find the next relevant commit, you do a project compare (to the project revision you checked out from SVN and disconnected earlier), accept all the changes, commit all (manually copying the commit message and conmitter details) and push.
Tags to be added using git bash.
I'd like to chime in that various steps
during this process are very cpu intensive and caused CODESYS to sometimes slow down beyond workable or crash. Especially during Project compare phase.
Last edit: h-hermsen 2021-10-03