Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py

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

eric ide

mercurial