Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 213
42bb97ff0bbb
parent 207
3f889378dede
child 216
6f9713e8d570
equal deleted inserted replaced
212:19785b4c1bed 213:42bb97ff0bbb
1654 1654
1655 fname, selectedFilter = QFileDialog.getSaveFileNameAndFilter(\ 1655 fname, selectedFilter = QFileDialog.getSaveFileNameAndFilter(\
1656 None, 1656 None,
1657 self.trUtf8("Create changegroup"), 1657 self.trUtf8("Create changegroup"),
1658 None, 1658 None,
1659 self.trUtf8("Mercurial Bundle Files (*.bundle)"), 1659 self.trUtf8("Mercurial Bundle Files (*.hg)"),
1660 None, 1660 None,
1661 QFileDialog.Options(QFileDialog.DontConfirmOverwrite)) 1661 QFileDialog.Options(QFileDialog.DontConfirmOverwrite))
1662 1662
1663 if not fname: 1663 if not fname:
1664 return # user aborted 1664 return # user aborted
1697 dia = HgDialog(self.trUtf8('Create changegroup')) 1697 dia = HgDialog(self.trUtf8('Create changegroup'))
1698 res = dia.startProcess(args, repodir) 1698 res = dia.startProcess(args, repodir)
1699 if res: 1699 if res:
1700 dia.exec_() 1700 dia.exec_()
1701 1701
1702 def hgPreviewBundle(self, name):
1703 """
1704 Public method used to view the log of incoming changes from a
1705 changegroup file.
1706
1707 @param name file/directory name to show the log of (string)
1708 """
1709 file = QFileDialog.getOpenFileName(\
1710 None,
1711 self.trUtf8("Preview changegroup"),
1712 "",
1713 self.trUtf8("Mercurial Bundle Files (*.hg);;All Files (*)"))
1714 if file:
1715 if self.getPlugin().getPreferences("UseLogBrowser"):
1716 self.logBrowser = \
1717 HgLogBrowserDialog(self, mode = "incoming", bundle = file)
1718 self.logBrowser.show()
1719 self.logBrowser.start(name)
1720 else:
1721 self.log = HgLogDialog(self, mode = "incoming", bundle = file)
1722 self.log.show()
1723 self.log.start(name)
1724
1702 def hgUnbundle(self, name): 1725 def hgUnbundle(self, name):
1703 """ 1726 """
1704 Public method to apply changegroup files. 1727 Public method to apply changegroup files.
1705 1728
1706 @param name file/directory name (string) 1729 @param name file/directory name (string)
1716 1739
1717 files = QFileDialog.getOpenFileNames(\ 1740 files = QFileDialog.getOpenFileNames(\
1718 None, 1741 None,
1719 self.trUtf8("Apply changegroups"), 1742 self.trUtf8("Apply changegroups"),
1720 "", 1743 "",
1721 self.trUtf8("Mercurial Bundle Files (*.bundle);;All Files (*)")) 1744 self.trUtf8("Mercurial Bundle Files (*.hg);;All Files (*)"))
1722 if files: 1745 if files:
1723 update = QMessageBox.question(None, 1746 update = QMessageBox.question(None,
1724 self.trUtf8("Apply changegroups"), 1747 self.trUtf8("Apply changegroups"),
1725 self.trUtf8("""Shall the working directory be updated?"""), 1748 self.trUtf8("""Shall the working directory be updated?"""),
1726 QMessageBox.StandardButtons(\ 1749 QMessageBox.StandardButtons(\

eric ide

mercurial