151 |
151 |
152 self.__switchAct = self.__actionsMenu.addAction( |
152 self.__switchAct = self.__actionsMenu.addAction( |
153 self.tr("Switch"), self.__switchActTriggered) |
153 self.tr("Switch"), self.__switchActTriggered) |
154 self.__switchAct.setToolTip(self.tr( |
154 self.__switchAct.setToolTip(self.tr( |
155 "Switch the working directory to the selected revision")) |
155 "Switch the working directory to the selected revision")) |
|
156 |
|
157 if self.vcs.version >= (2, 0): |
|
158 self.__lfPullAct = self.__actionsMenu.addAction( |
|
159 self.tr("Pull Large Files"), self.__lfPullActTriggered) |
|
160 self.__lfPullAct.setToolTip(self.tr( |
|
161 "Pull large files for selected revisions")) |
|
162 else: |
|
163 self.__lfPullAct = None |
156 |
164 |
157 self.actionsButton.setIcon( |
165 self.actionsButton.setIcon( |
158 UI.PixmapCache.getIcon("actionsToolButton.png")) |
166 UI.PixmapCache.getIcon("actionsToolButton.png")) |
159 self.actionsButton.setMenu(self.__actionsMenu) |
167 self.actionsButton.setMenu(self.__actionsMenu) |
160 |
168 |
1142 self.__graftAct.setEnabled(otherBranches > 0) |
1150 self.__graftAct.setEnabled(otherBranches > 0) |
1143 |
1151 |
1144 self.__tagAct.setEnabled(len(self.logTree.selectedItems()) == 1) |
1152 self.__tagAct.setEnabled(len(self.logTree.selectedItems()) == 1) |
1145 self.__switchAct.setEnabled(len(self.logTree.selectedItems()) == 1) |
1153 self.__switchAct.setEnabled(len(self.logTree.selectedItems()) == 1) |
1146 |
1154 |
|
1155 if self.__lfPullAct is not None: |
|
1156 if self.vcs.isExtensionActive("largefiles"): |
|
1157 self.__lfPullAct.setEnabled(bool( |
|
1158 self.logTree.selectedItems())) |
|
1159 else: |
|
1160 self.__lfPullAct.setEnabled(False) |
|
1161 |
1147 self.actionsButton.setEnabled(True) |
1162 self.actionsButton.setEnabled(True) |
1148 else: |
1163 else: |
1149 self.actionsButton.setEnabled(False) |
1164 self.actionsButton.setEnabled(False) |
1150 |
1165 |
1151 def __updateGui(self, itm): |
1166 def __updateGui(self, itm): |
1519 if res: |
1534 if res: |
1520 e5App().getObject("Project").reopenProject() |
1535 e5App().getObject("Project").reopenProject() |
1521 return |
1536 return |
1522 |
1537 |
1523 self.on_refreshButton_clicked() |
1538 self.on_refreshButton_clicked() |
|
1539 |
|
1540 def __lfPullActTriggered(self): |
|
1541 """ |
|
1542 Private slot to pull large files of selected revisions. |
|
1543 """ |
|
1544 revs = [] |
|
1545 for itm in self.logTree.selectedItems(): |
|
1546 rev = itm.text(self.RevisionColumn).strip().split(":", 1)[0] |
|
1547 if rev: |
|
1548 revs.append(rev) |
|
1549 |
|
1550 if revs: |
|
1551 self.vcs.getExtensionObject("largefiles").hgLfPull( |
|
1552 self.repodir, revisions=revs) |