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

SVN branches/tags

MaGu
2015-04-17
2015-05-04
  • MaGu - 2015-04-17

    Hey, is there a way to use the " copy (branch/tag) " command ... and some steps following (switch to new location, increment version numbers, Placeholders...) within python (CODESYS). Thanks!

     
  • mkeller - 2015-04-17

    Hi.

    The branch/tag commands were simply forgotten for the script interface. We have already an entry in our bugtracking. See SVN-162.

    There are two workaronds:

    • Use the following command where the second parameter (as boolean) specifies if you want to switch to the new branch:

      Zitat:
      system.commands["svn", "copy"].execute("svn://new/destination/url", "false", "commit message")

    • Use the SharpSVN library directly (see attached python file)

    BR
    Martin

    testbranch.py [417 Bytes]

     
  • MaGu - 2015-04-29

    thanks, works fine. One thing. How to switch to the new location? I tried sharpsvn and i tried script interface. What is the best way? I am a little bit confused... path, uri, string, SvnUriTarget...

     
  • mkeller - 2015-05-04

    Hi MaGu.

    If you use the Copy command you can change the second parameter to "true" for switching immediately after the copy:

    system.commands["svn", "copy"].execute("svn://new/destination/url", "true", "commit message")
    

    Otherwise you can use one of the switch methods of the project object. Look for IVersionedProject in the scripting documenation.

    BR
    Martin

     

Log in to post a comment.