#48 Cforge tool integration

9.9.9.9: Backlog
wont-fix
None
2021-02-22
2020-08-22
i-campbell
No

According to the Cforge homepage we can get the following such advantages.

Import / Commit

Again, you can use the standard mechanism of CODESYS SVN to commit your changes on your projects. But here cforge has several advantages:

You can import or check in several projects and libraries at once
cforge will also commit every project in binary form, containing the SVN connection settings to your repository
cforge will commit a Markdown file, containing an export of the source code

MyProject/
MyLib/

(these files are generated)
MyProject.project
MyProject.md
MyLib.library
MyLib.md

So investigate integrating the cforge tool into our workflow.

Discussion

  • i-campbell

    i-campbell - 2020-08-22

    Trying to checkout the repository gives the following error:

    [INFO] Executing: C:\Program Files\CODESYS 3.5.16.10\CODESYS\CFORGE\Scripts\checkout.py

    C:\Program Files\CODESYS 3.5.16.10\CODESYS\CFORGE\Scripts\action.svn.checkout.py
    running codesys with script C:\Program Files\CODESYS 3.5.16.10\CODESYS\CFORGE\Scripts\action.svn.checkout.py
    svn: E175009: The XML response contains invalid XML
    svn: E130003: Malformed XML: no element found at line 1

    Version Info:
    CODESYS IDE 3.5.16.10
    CODESYS SVN 4.2.6.0
    Tortoise SVN 1.14
    cforge tool 1.0.0.29
    This repository [r303]

    Sounds like it is getting a false svn URL?

     
  • i-campbell

    i-campbell - 2020-08-22

    Seems repository specific, as SM3RaspiStepper works. At least it extracts the repositories, even if it throws a few KeyNotFoundException.

    SVN: Information: [00:27:28] Added SM3_Drive_RaspiStepper
    SVN: Information: [00:27:28] Completed at revision: 24
    SVN: Information: [00:27:28] Added: 95
    SVN: Information: [00:27:28] ---------- Scripted SVN Operation ----------
    
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
       at System.ThrowHelper.ThrowKeyNotFoundException()
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at _3S.CoDeSys.Svn.SVNVersionInfoData.get_WorkingCopyExists()
       at _3S.CoDeSys.Svn.SVNVersionInfoData.IsInitialized(SVNVersionInfoData vid)
       ...
    
     
  • i-campbell

    i-campbell - 2020-08-22

    The cforge checkout fails because Cforge/Scripts/pysvn.py:svn_list() calls this command line:

    args = " -R"
    svn list %s --username=%s --password=%s %s" % (args, username, password, url)
    

    If I try the same in command prompt, I get the E175009 error only for these two svn addresses:

    svn list  -R https://forge.codesys.com/svn/prj,mqttsparkplugb,code/
    svn list  -R https://forge.codesys.com/svn/prj,mqttsparkplugb,code/trunk/
    

    but listing the components of trunk is no problem (trunk contains only one folder, mqttsparkplugb):

    svn list  -R https://forge.codesys.com/svn/prj,mqttsparkplugb,code/trunk/mqttsparkplugb/
    svn list https://forge.codesys.com/svn/prj,mqttsparkplugb,code/trunk/
    

    My first guess is a length issue, ie the command can't handle paths bigger than 256, but I don't know yet which end this is.

    I guess checking the server logs might help, but I can see with wireshark exactly what response I get from the server.

     
  • i-campbell

    i-campbell - 2020-08-23

    Wireshark analysis shows:
    After recieving the request, the server waits 30 seconds then sends a FIN ACK. ie. it gives no response.

    So it could be the path length is now too great, or it could be the SVN server has a limit on the XML response size. I think only the SVN logs can say why no response is given for the svn list command.

     
  • i-campbell

    i-campbell - 2020-08-23

    OK, I am convinced it is some sort of timeout issue.
    sometimes the same command reports the error, and sometimes it responds correctly.
    eg.

    C:\Ian>svn list  -R https://forge.codesys.com/svn/prj,mqttsparkplugb,code/trunk/mqttsparkplugb/
    svn: E175009: The XML response contains invalid XML
    svn: E130003: Malformed XML: no element found at line 1
    
    C:\Ian>svn list  -R https://forge.codesys.com/svn/prj,mqttsparkplugb,code/trunk/mqttsparkplugb/
    mqttsparkplugb/
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Ian_Payload.txt/
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Ian_Payload.txt/svnobj
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Users_user_Desktop_Behaviour-Model_Enums_STATE.png/
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Users_user_Desktop_Behaviour-Model_Enums_STATE.png/svnobj
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Users_user_Desktop_EoN node MQTT Session Establishment.png/
    mqttsparkplugb/00000000-0000-0000-0000-000000000000_C_Users_user_Desktop_EoN node MQTT Session Establishment.png/svnobj
    [OUTPUT TRIMMED BY ME]
    
     
  • aliazzz

    aliazzz - 2020-08-23

    Probably a good catch!

     
  • i-campbell

    i-campbell - 2020-08-25
    • Milestone: 1.0 basic protobufs --> 999.0 Backlog
     
  • i-campbell

    i-campbell - 2020-10-09
    • Milestone: 999 Backlog --> 9.9.9.9: Backlog
     
  • i-campbell

    i-campbell - 2021-02-22
    • status: open --> wont-fix
     
  • i-campbell

    i-campbell - 2021-02-22

    Tool is not yet suitable for large SVN repositories, and if we just wait, CODESYS Git will be available.

     

Log in to post a comment.