212 self.tr("Pull Large Files"), self.__lfPullActTriggered) |
212 self.tr("Pull Large Files"), self.__lfPullActTriggered) |
213 self.__lfPullAct.setToolTip(self.tr( |
213 self.__lfPullAct.setToolTip(self.tr( |
214 "Pull large files for selected revisions")) |
214 "Pull large files for selected revisions")) |
215 self.__fetchAct = self.__actionsMenu.addAction( |
215 self.__fetchAct = self.__actionsMenu.addAction( |
216 self.tr("Fetch Changes"), self.__fetchActTriggered) |
216 self.tr("Fetch Changes"), self.__fetchActTriggered) |
|
217 self.__fetchAct.setToolTip(self.tr( |
|
218 "Fetch changes from a remote repository")) |
217 |
219 |
218 self.__actionsMenu.addSeparator() |
220 self.__actionsMenu.addSeparator() |
219 |
221 |
220 self.__pushAct = self.__actionsMenu.addAction( |
222 self.__pushAct = self.__actionsMenu.addAction( |
221 self.tr("Push Selected Changes"), self.__pushActTriggered) |
223 self.tr("Push Selected Changes"), self.__pushActTriggered) |
229 |
231 |
230 self.__actionsMenu.addSeparator() |
232 self.__actionsMenu.addSeparator() |
231 |
233 |
232 self.__stripAct = self.__actionsMenu.addAction( |
234 self.__stripAct = self.__actionsMenu.addAction( |
233 self.tr("Strip Changesets"), self.__stripActTriggered) |
235 self.tr("Strip Changesets"), self.__stripActTriggered) |
|
236 self.__stripAct.setToolTip(self.tr( |
|
237 "Strip changesets from a repository")) |
234 |
238 |
235 self.actionsButton.setIcon( |
239 self.actionsButton.setIcon( |
236 UI.PixmapCache.getIcon("actionsToolButton.png")) |
240 UI.PixmapCache.getIcon("actionsToolButton.png")) |
237 self.actionsButton.setMenu(self.__actionsMenu) |
241 self.actionsButton.setMenu(self.__actionsMenu) |
238 |
242 |
1739 @pyqtSlot() |
1743 @pyqtSlot() |
1740 def __fetchActTriggered(self): |
1744 def __fetchActTriggered(self): |
1741 """ |
1745 """ |
1742 Private slot to fetch changes from a remote repository. |
1746 Private slot to fetch changes from a remote repository. |
1743 """ |
1747 """ |
1744 self.vcs.getExtensionObject("fetch").hgFetch(self.repodir) |
1748 shouldReopen = self.vcs.getExtensionObject("fetch").hgFetch( |
|
1749 self.repodir) |
|
1750 if shouldReopen: |
|
1751 res = E5MessageBox.yesNo( |
|
1752 None, |
|
1753 self.tr("Fetch Changes"), |
|
1754 self.tr( |
|
1755 """The project should be reread. Do this now?"""), |
|
1756 yesDefault=True) |
|
1757 if res: |
|
1758 e5App().getObject("Project").reopenProject() |
|
1759 return |
|
1760 |
1745 self.on_refreshButton_clicked() |
1761 self.on_refreshButton_clicked() |
1746 |
1762 |
1747 @pyqtSlot() |
1763 @pyqtSlot() |
1748 def __pullActTriggered(self): |
1764 def __pullActTriggered(self): |
1749 """ |
1765 """ |
1750 Private slot to pull changes from a remote repository. |
1766 Private slot to pull changes from a remote repository. |
1751 """ |
1767 """ |
1752 self.vcs.hgPull(self.repodir) |
1768 shouldReopen = self.vcs.hgPull(self.repodir) |
|
1769 if shouldReopen: |
|
1770 res = E5MessageBox.yesNo( |
|
1771 None, |
|
1772 self.tr("Pull Changes"), |
|
1773 self.tr( |
|
1774 """The project should be reread. Do this now?"""), |
|
1775 yesDefault=True) |
|
1776 if res: |
|
1777 e5App().getObject("Project").reopenProject() |
|
1778 return |
|
1779 |
1753 self.on_refreshButton_clicked() |
1780 self.on_refreshButton_clicked() |
1754 |
1781 |
1755 @pyqtSlot() |
1782 @pyqtSlot() |
1756 def __pushActTriggered(self): |
1783 def __pushActTriggered(self): |
1757 """ |
1784 """ |
1777 """ |
1804 """ |
1778 Private slot to strip changesets from the repository. |
1805 Private slot to strip changesets from the repository. |
1779 """ |
1806 """ |
1780 itm = self.logTree.selectedItems()[0] |
1807 itm = self.logTree.selectedItems()[0] |
1781 rev = itm.text(self.RevisionColumn).strip().split(":", 1)[1] |
1808 rev = itm.text(self.RevisionColumn).strip().split(":", 1)[1] |
1782 self.vcs.getExtensionObject("strip").hgStrip(self.repodir, rev=rev) |
1809 shouldReopen = self.vcs.getExtensionObject("strip").hgStrip( |
|
1810 self.repodir, rev=rev) |
|
1811 if shouldReopen: |
|
1812 res = E5MessageBox.yesNo( |
|
1813 None, |
|
1814 self.tr("Strip Changesets"), |
|
1815 self.tr( |
|
1816 """The project should be reread. Do this now?"""), |
|
1817 yesDefault=True) |
|
1818 if res: |
|
1819 e5App().getObject("Project").reopenProject() |
|
1820 return |
|
1821 |
1783 self.on_refreshButton_clicked() |
1822 self.on_refreshButton_clicked() |
1784 |
1823 |
1785 def __actionMode(self): |
1824 def __actionMode(self): |
1786 """ |
1825 """ |
1787 Private method to get the selected action mode. |
1826 Private method to get the selected action mode. |