134 self.__rowHeight = 20 |
134 self.__rowHeight = 20 |
135 |
135 |
136 self.logTree.setIconSize( |
136 self.logTree.setIconSize( |
137 QSize(100 * self.__rowHeight, self.__rowHeight)) |
137 QSize(100 * self.__rowHeight, self.__rowHeight)) |
138 if self.vcs.version >= (1, 8): |
138 if self.vcs.version >= (1, 8): |
139 self.logTree.headerItem().setText(self.logTree.columnCount(), |
139 self.logTree.headerItem().setText( |
140 self.trUtf8("Bookmarks")) |
140 self.logTree.columnCount(), self.trUtf8("Bookmarks")) |
141 if self.vcs.version < (2, 1): |
141 if self.vcs.version < (2, 1): |
142 self.logTree.setColumnHidden(self.PhaseColumn, True) |
142 self.logTree.setColumnHidden(self.PhaseColumn, True) |
143 self.phaseLine.hide() |
143 self.phaseLine.hide() |
144 self.phaseButton.hide() |
144 self.phaseButton.hide() |
145 if self.vcs.version < (2, 0): |
145 if self.vcs.version < (2, 0): |
208 def __resortFiles(self): |
208 def __resortFiles(self): |
209 """ |
209 """ |
210 Private method to resort the changed files tree. |
210 Private method to resort the changed files tree. |
211 """ |
211 """ |
212 sortColumn = self.filesTree.sortColumn() |
212 sortColumn = self.filesTree.sortColumn() |
213 self.filesTree.sortItems(1, |
213 self.filesTree.sortItems( |
214 self.filesTree.header().sortIndicatorOrder()) |
214 1, self.filesTree.header().sortIndicatorOrder()) |
215 self.filesTree.sortItems(sortColumn, |
215 self.filesTree.sortItems( |
216 self.filesTree.header().sortIndicatorOrder()) |
216 sortColumn, self.filesTree.header().sortIndicatorOrder()) |
217 |
217 |
218 def __getColor(self, n): |
218 def __getColor(self, n): |
219 """ |
219 """ |
220 Private method to get the (rotating) name of the color given an index. |
220 Private method to get the (rotating) name of the color given an index. |
221 |
221 |
428 "The hg process did not finish within 30s.") |
428 "The hg process did not finish within 30s.") |
429 else: |
429 else: |
430 errMsg = self.trUtf8("Could not start the hg executable.") |
430 errMsg = self.trUtf8("Could not start the hg executable.") |
431 |
431 |
432 if errMsg: |
432 if errMsg: |
433 E5MessageBox.critical(self, |
433 E5MessageBox.critical( |
|
434 self, |
434 self.trUtf8("Mercurial Error"), |
435 self.trUtf8("Mercurial Error"), |
435 errMsg) |
436 errMsg) |
436 |
437 |
437 if output: |
438 if output: |
438 parents = [int(p) for p in output.strip().splitlines()] |
439 parents = [int(p) for p in output.strip().splitlines()] |
470 "The hg process did not finish within 30s.") |
471 "The hg process did not finish within 30s.") |
471 else: |
472 else: |
472 errMsg = self.trUtf8("Could not start the hg executable.") |
473 errMsg = self.trUtf8("Could not start the hg executable.") |
473 |
474 |
474 if errMsg: |
475 if errMsg: |
475 E5MessageBox.critical(self, |
476 E5MessageBox.critical( |
|
477 self, |
476 self.trUtf8("Mercurial Error"), |
478 self.trUtf8("Mercurial Error"), |
477 errMsg) |
479 errMsg) |
478 |
480 |
479 if output: |
481 if output: |
480 outputList = output.strip().split(None, 1) |
482 outputList = output.strip().split(None, 1) |
516 "The hg process did not finish within 30s.") |
518 "The hg process did not finish within 30s.") |
517 else: |
519 else: |
518 errMsg = self.trUtf8("Could not start the hg executable.") |
520 errMsg = self.trUtf8("Could not start the hg executable.") |
519 |
521 |
520 if errMsg: |
522 if errMsg: |
521 E5MessageBox.critical(self, |
523 E5MessageBox.critical( |
|
524 self, |
522 self.trUtf8("Mercurial Error"), |
525 self.trUtf8("Mercurial Error"), |
523 errMsg) |
526 errMsg) |
524 |
527 |
525 if output: |
528 if output: |
526 for line in output.splitlines(): |
529 for line in output.splitlines(): |
711 self.process.start('hg', args) |
714 self.process.start('hg', args) |
712 procStarted = self.process.waitForStarted(5000) |
715 procStarted = self.process.waitForStarted(5000) |
713 if not procStarted: |
716 if not procStarted: |
714 self.inputGroup.setEnabled(False) |
717 self.inputGroup.setEnabled(False) |
715 self.inputGroup.hide() |
718 self.inputGroup.hide() |
716 E5MessageBox.critical(self, |
719 E5MessageBox.critical( |
|
720 self, |
717 self.trUtf8('Process Generation Error'), |
721 self.trUtf8('Process Generation Error'), |
718 self.trUtf8( |
722 self.trUtf8( |
719 'The process {0} could not be started. ' |
723 'The process {0} could not be started. ' |
720 'Ensure, that it is in the search path.' |
724 'Ensure, that it is in the search path.' |
721 ).format('hg')) |
725 ).format('hg')) |
862 continue |
866 continue |
863 if value.strip(): |
867 if value.strip(): |
864 log["message"].append(value.strip()) |
868 log["message"].append(value.strip()) |
865 else: |
869 else: |
866 if len(log) > 1: |
870 if len(log) > 1: |
867 self.__generateLogItem(log["author"], log["date"], |
871 self.__generateLogItem( |
|
872 log["author"], log["date"], |
868 log["message"], log["revision"], changedPaths, |
873 log["message"], log["revision"], changedPaths, |
869 log["parents"], log["branches"], log["tags"], |
874 log["parents"], log["branches"], log["tags"], |
870 log["phase"], log["bookmarks"]) |
875 log["phase"], log["bookmarks"]) |
871 dt = QDate.fromString(log["date"], Qt.ISODate) |
876 dt = QDate.fromString(log["date"], Qt.ISODate) |
872 if not self.__maxDate.isValid() and \ |
877 if not self.__maxDate.isValid() and \ |
1389 itm.text(self.RevisionColumn).strip().split(":", 1)[0]) |
1394 itm.text(self.RevisionColumn).strip().split(":", 1)[0]) |
1390 |
1395 |
1391 if revs: |
1396 if revs: |
1392 shouldReopen = self.vcs.hgGraft(self.repodir, revs) |
1397 shouldReopen = self.vcs.hgGraft(self.repodir, revs) |
1393 if shouldReopen: |
1398 if shouldReopen: |
1394 res = E5MessageBox.yesNo(None, |
1399 res = E5MessageBox.yesNo( |
|
1400 None, |
1395 self.trUtf8("Copy Changesets"), |
1401 self.trUtf8("Copy Changesets"), |
1396 self.trUtf8( |
1402 self.trUtf8( |
1397 """The project should be reread. Do this now?"""), |
1403 """The project should be reread. Do this now?"""), |
1398 yesDefault=True) |
1404 yesDefault=True) |
1399 if res: |
1405 if res: |