Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py

changeset 3009
bf5ae5d7477d
parent 2302
f29e9405c851
child 3037
a417a0670a36
child 3057
10516539f238
equal deleted inserted replaced
3008:7848489bcb92 3009:bf5ae5d7477d
62 self.__clientSslServerTrustPromptCallback 62 self.__clientSslServerTrustPromptCallback
63 63
64 cwd = os.getcwd() 64 cwd = os.getcwd()
65 os.chdir(self.projectDir) 65 os.chdir(self.projectDir)
66 try: 66 try:
67 allFiles = client.status('.', 67 allFiles = client.status(
68 recurse=True, 68 '.', recurse=True, get_all=True, ignore=True,
69 get_all=True, 69 update=not Preferences.getVCS("MonitorLocalStatus"))
70 ignore=True,
71 update=not Preferences.getVCS("MonitorLocalStatus"))
72 states = {} 70 states = {}
73 for file in allFiles: 71 for file in allFiles:
74 uptodate = True 72 uptodate = True
75 if file.repos_text_status != pysvn.wc_status_kind.none: 73 if file.repos_text_status != pysvn.wc_status_kind.none:
76 uptodate = uptodate and \ 74 uptodate = uptodate and \
100 status = "R" 98 status = "R"
101 if status: 99 if status:
102 states[file.path] = status 100 states[file.path] = status
103 try: 101 try:
104 if self.reportedStates[file.path] != status: 102 if self.reportedStates[file.path] != status:
105 self.statusList.append("{0} {1}".format(status, file.path)) 103 self.statusList.append(
104 "{0} {1}".format(status, file.path))
106 except KeyError: 105 except KeyError:
107 self.statusList.append("{0} {1}".format(status, file.path)) 106 self.statusList.append(
107 "{0} {1}".format(status, file.path))
108 for name in list(self.reportedStates.keys()): 108 for name in list(self.reportedStates.keys()):
109 if name not in states: 109 if name not in states:
110 self.statusList.append(" {0}".format(name)) 110 self.statusList.append(" {0}".format(name))
111 self.reportedStates = states 111 self.reportedStates = states
112 res = True 112 res = True
113 statusStr = \ 113 statusStr = self.trUtf8(
114 self.trUtf8("Subversion status checked successfully (using pysvn)") 114 "Subversion status checked successfully (using pysvn)")
115 except pysvn.ClientError as e: 115 except pysvn.ClientError as e:
116 res = False 116 res = False
117 statusStr = e.args[0] 117 statusStr = e.args[0]
118 os.chdir(cwd) 118 os.chdir(cwd)
119 return res, statusStr 119 return res, statusStr

eric ide

mercurial