30 """ |
30 """ |
31 VcsStatusMonitorThread.__init__(self, interval, project, vcs, parent) |
31 VcsStatusMonitorThread.__init__(self, interval, project, vcs, parent) |
32 |
32 |
33 self.__ioEncoding = Preferences.getSystem("IOEncoding") |
33 self.__ioEncoding = Preferences.getSystem("IOEncoding") |
34 |
34 |
35 self.rx_status1 = \ |
35 self.rx_status1 = QRegExp('(.{8,9})\\s+([0-9-]+)\\s+(.+)\\s*') |
36 QRegExp('(.{8,9})\\s+([0-9-]+)\\s+(.+)\\s*') |
|
37 self.rx_status2 = QRegExp( |
36 self.rx_status2 = QRegExp( |
38 '(.{8,9})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)\\s*') |
37 '(.{8,9})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)\\s*') |
39 |
38 |
40 def _performMonitor(self): |
39 def _performMonitor(self): |
41 """ |
40 """ |
83 elif self.rx_status2.exactMatch(line): |
82 elif self.rx_status2.exactMatch(line): |
84 flags = self.rx_status2.cap(1) |
83 flags = self.rx_status2.cap(1) |
85 path = self.rx_status2.cap(5).strip() |
84 path = self.rx_status2.cap(5).strip() |
86 else: |
85 else: |
87 continue |
86 continue |
88 if flags[0] in "ACDMR" or \ |
87 if ( |
89 (flags[0] == " " and flags[-1] == "*"): |
88 flags[0] in "ACDMR" or |
|
89 (flags[0] == " " and flags[-1] == "*") |
|
90 ): |
90 if flags[-1] == "*": |
91 if flags[-1] == "*": |
91 status = "U" |
92 status = "U" |
92 else: |
93 else: |
93 status = flags[0] |
94 status = flags[0] |
94 if status == "C": |
95 if status == "C": |
113 return True, self.tr( |
114 return True, self.tr( |
114 "Subversion status checked successfully (using svn)") |
115 "Subversion status checked successfully (using svn)") |
115 else: |
116 else: |
116 process.kill() |
117 process.kill() |
117 process.waitForFinished() |
118 process.waitForFinished() |
118 return False, \ |
119 return ( |
|
120 False, |
119 str(process.readAllStandardError(), |
121 str(process.readAllStandardError(), |
120 Preferences.getSystem("IOEncoding"), |
122 Preferences.getSystem("IOEncoding"), |
121 'replace') |
123 'replace') |
|
124 ) |
122 else: |
125 else: |
123 process.kill() |
126 process.kill() |
124 process.waitForFinished() |
127 process.waitForFinished() |
125 return False, self.tr( |
128 return False, self.tr( |
126 "Could not start the Subversion process.") |
129 "Could not start the Subversion process.") |