Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1509
c0b5e693b0eb
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
13 13
14 from VCS.StatusMonitorThread import VcsStatusMonitorThread 14 from VCS.StatusMonitorThread import VcsStatusMonitorThread
15 15
16 import Preferences 16 import Preferences
17 17
18
18 class SvnStatusMonitorThread(VcsStatusMonitorThread): 19 class SvnStatusMonitorThread(VcsStatusMonitorThread):
19 """ 20 """
20 Class implementing the VCS status monitor thread class for Subversion. 21 Class implementing the VCS status monitor thread class for Subversion.
21 """ 22 """
22 def __init__(self, interval, project, vcs, parent = None): 23 def __init__(self, interval, project, vcs, parent=None):
23 """ 24 """
24 Constructor 25 Constructor
25 26
26 @param interval new interval in seconds (integer) 27 @param interval new interval in seconds (integer)
27 @param project reference to the project object (Project) 28 @param project reference to the project object (Project)
45 <li>"U" path needs an update</li> 46 <li>"U" path needs an update</li>
46 <li>"Z" path contains a conflict</li> 47 <li>"Z" path contains a conflict</li>
47 <li>" " path is back at normal</li> 48 <li>" " path is back at normal</li>
48 </ul> 49 </ul>
49 50
50 @return tuple of flag indicating successful operation (boolean) and 51 @return tuple of flag indicating successful operation (boolean) and
51 a status message in case of non successful operation (string) 52 a status message in case of non successful operation (string)
52 """ 53 """
53 self.shouldUpdate = False 54 self.shouldUpdate = False
54 55
55 client = pysvn.Client() 56 client = pysvn.Client()
60 self.__clientSslServerTrustPromptCallback 61 self.__clientSslServerTrustPromptCallback
61 62
62 cwd = os.getcwd() 63 cwd = os.getcwd()
63 os.chdir(self.projectDir) 64 os.chdir(self.projectDir)
64 try: 65 try:
65 allFiles = client.status('.', recurse = True, get_all = True, 66 allFiles = client.status('.',
66 ignore = True, 67 recurse=True,
67 update = \ 68 get_all=True,
68 not Preferences.getVCS("MonitorLocalStatus")) 69 ignore=True,
70 update=not Preferences.getVCS("MonitorLocalStatus"))
69 states = {} 71 states = {}
70 for file in allFiles: 72 for file in allFiles:
71 uptodate = True 73 uptodate = True
72 if file.repos_text_status != pysvn.wc_status_kind.none: 74 if file.repos_text_status != pysvn.wc_status_kind.none:
73 uptodate = uptodate and file.repos_text_status == file.text_status 75 uptodate = uptodate and file.repos_text_status == file.text_status
117 @param realm name of the realm of the requested credentials (string) 119 @param realm name of the realm of the requested credentials (string)
118 @param username username as supplied by subversion (string) 120 @param username username as supplied by subversion (string)
119 @param may_save flag indicating, that subversion is willing to save 121 @param may_save flag indicating, that subversion is willing to save
120 the answers returned (boolean) 122 the answers returned (boolean)
121 @return tuple of four values (retcode, username, password, save). 123 @return tuple of four values (retcode, username, password, save).
122 Retcode should be True, if username and password should be used 124 Retcode should be True, if username and password should be used
123 by subversion, username and password contain the relevant data 125 by subversion, username and password contain the relevant data
124 as strings and save is a flag indicating, that username and 126 as strings and save is a flag indicating, that username and
125 password should be saved. Always returns (False, "", "", False). 127 password should be saved. Always returns (False, "", "", False).
126 """ 128 """
127 return (False, "", "", False) 129 return (False, "", "", False)
128 130

eric ide

mercurial