CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Thu Sep 19, 2019 4:07 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Dec 18, 2013 10:22 am 
Offline

Joined: Tue Dec 17, 2013 3:58 pm
Posts: 2
Hi,

I have a problem when trying to commit to SVN using a python script.
When I do the following:
Code:
proj.svn.commit(r'Updated by build server')


I get an error if I dont set the project infomation object first:
Code:
projInfo = proj.get_project_info()
projInfo.version = "1.0.0.0"


If I set the project information object, as above, the commit succeeds, but leaves the project information object locked in SVN.
(Notice that if the project information object is modified compared to the SVN base, then it is commited and left unlocked as it should, but if the project information object does not contain modifications it is left in the locked state, which is a problem since the next time I run the script it will fail)

I have tried using the unlock method, like
Code:
proj.svn.unlock()
as described in the documentation, but I get an error when using this saying that the unlock method does not exist.

This means that I cannot commit from python, without the project information object being left in the locked state.

Any suggestions how to solve this?

Thank in advance.


Top
   
PostPosted: Wed Dec 18, 2013 1:40 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Fri Mar 18, 2011 4:12 pm
Posts: 266
Hi,

First: Which error do you get exactly when trying to commit your project?

In my tests, I could commit several projects with and without project information objects, and with and without a version information set.

Second: If there's a real change, the lock gets removed during the commit. Only when the project information object does not have local changes, it gets not unlocked during the commit, as it is not part of the commit.

Third: You need to issue the unlock() command on the locked object, not the project:

Code:
projInfo.svn.unlock()


HTH,
Markus

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited