eric6/Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 7759
51aa6c6b66f7
parent 7719
a20dce3647ee
child 7785
9978016560ec
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
310 args.append(projectDir) 310 args.append(projectDir)
311 # init is not possible with the command server 311 # init is not possible with the command server
312 dia = HgDialog(self.tr('Creating Mercurial repository'), self) 312 dia = HgDialog(self.tr('Creating Mercurial repository'), self)
313 res = dia.startProcess(args) 313 res = dia.startProcess(args)
314 if res: 314 if res:
315 dia.exec_() 315 dia.exec()
316 status = dia.normalExit() 316 status = dia.normalExit()
317 317
318 if status: 318 if status:
319 ignoreName = os.path.join(projectDir, Hg.IgnoreFileName) 319 ignoreName = os.path.join(projectDir, Hg.IgnoreFileName)
320 if not os.path.exists(ignoreName): 320 if not os.path.exists(ignoreName):
328 dia = HgDialog( 328 dia = HgDialog(
329 self.tr('Initial commit to Mercurial repository'), 329 self.tr('Initial commit to Mercurial repository'),
330 self) 330 self)
331 res = dia.startProcess(args, projectDir) 331 res = dia.startProcess(args, projectDir)
332 if res: 332 if res:
333 dia.exec_() 333 dia.exec()
334 status = dia.normalExit() 334 status = dia.normalExit()
335 335
336 return status, False 336 return status, False
337 337
338 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False): 338 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False):
368 dia = HgDialog( 368 dia = HgDialog(
369 self.tr('Cloning project from a Mercurial repository'), 369 self.tr('Cloning project from a Mercurial repository'),
370 self) 370 self)
371 res = dia.startProcess(args) 371 res = dia.startProcess(args)
372 if res: 372 if res:
373 dia.exec_() 373 dia.exec()
374 return dia.normalExit() 374 return dia.normalExit()
375 375
376 def vcsExport(self, vcsDataDict, projectDir): 376 def vcsExport(self, vcsDataDict, projectDir):
377 """ 377 """
378 Public method used to export a directory from the Mercurial repository. 378 Public method used to export a directory from the Mercurial repository.
541 dia = HgDialog( 541 dia = HgDialog(
542 self.tr('Committing changes to Mercurial repository'), 542 self.tr('Committing changes to Mercurial repository'),
543 self) 543 self)
544 res = dia.startProcess(args, dname) 544 res = dia.startProcess(args, dname)
545 if res: 545 if res:
546 dia.exec_() 546 dia.exec()
547 self.committed.emit() 547 self.committed.emit()
548 if self.__forgotNames: 548 if self.__forgotNames:
549 model = e5App().getObject("Project").getModel() 549 model = e5App().getObject("Project").getModel()
550 for name in self.__forgotNames: 550 for name in self.__forgotNames:
551 model.updateVCSStatus(name) 551 model.updateVCSStatus(name)
612 dia = HgDialog(self.tr( 612 dia = HgDialog(self.tr(
613 'Synchronizing with the Mercurial repository'), 613 'Synchronizing with the Mercurial repository'),
614 self) 614 self)
615 res = dia.startProcess(args, repodir) 615 res = dia.startProcess(args, repodir)
616 if res: 616 if res:
617 dia.exec_() 617 dia.exec()
618 res = dia.hasAddOrDelete() 618 res = dia.hasAddOrDelete()
619 self.checkVCSStatus() 619 self.checkVCSStatus()
620 return res 620 return res
621 621
622 def vcsAdd(self, name, isDir=False, noDialog=False): 622 def vcsAdd(self, name, isDir=False, noDialog=False):
660 self.tr( 660 self.tr(
661 'Adding files/directories to the Mercurial repository'), 661 'Adding files/directories to the Mercurial repository'),
662 self) 662 self)
663 res = dia.startProcess(args, repodir) 663 res = dia.startProcess(args, repodir)
664 if res: 664 if res:
665 dia.exec_() 665 dia.exec()
666 666
667 def vcsAddBinary(self, name, isDir=False): 667 def vcsAddBinary(self, name, isDir=False):
668 """ 668 """
669 Public method used to add a file/directory in binary mode to the 669 Public method used to add a file/directory in binary mode to the
670 Mercurial repository. 670 Mercurial repository.
726 'Removing files/directories from the Mercurial' 726 'Removing files/directories from the Mercurial'
727 ' repository'), 727 ' repository'),
728 self) 728 self)
729 res = dia.startProcess(args, repodir) 729 res = dia.startProcess(args, repodir)
730 if res: 730 if res:
731 dia.exec_() 731 dia.exec()
732 res = dia.normalExitWithoutErrors() 732 res = dia.normalExitWithoutErrors()
733 733
734 return res 734 return res
735 735
736 def vcsMove(self, name, project, target=None, noDialog=False): 736 def vcsMove(self, name, project, target=None, noDialog=False):
752 force = True 752 force = True
753 accepted = True 753 accepted = True
754 else: 754 else:
755 from .HgCopyDialog import HgCopyDialog 755 from .HgCopyDialog import HgCopyDialog
756 dlg = HgCopyDialog(name, None, True) 756 dlg = HgCopyDialog(name, None, True)
757 accepted = dlg.exec_() == QDialog.Accepted 757 accepted = dlg.exec() == QDialog.Accepted
758 if accepted: 758 if accepted:
759 target, force = dlg.getData() 759 target, force = dlg.getData()
760 760
761 if accepted: 761 if accepted:
762 args = self.initCommand("rename") 762 args = self.initCommand("rename")
779 res = err == "" 779 res = err == ""
780 else: 780 else:
781 dia = HgDialog(self.tr('Renaming {0}').format(name), self) 781 dia = HgDialog(self.tr('Renaming {0}').format(name), self)
782 res = dia.startProcess(args, repodir) 782 res = dia.startProcess(args, repodir)
783 if res: 783 if res:
784 dia.exec_() 784 dia.exec()
785 res = dia.normalExit() 785 res = dia.normalExit()
786 if res: 786 if res:
787 if target.startswith(project.getProjectPath()): 787 if target.startswith(project.getProjectPath()):
788 if isDir: 788 if isDir:
789 project.moveDirectory(name, target) 789 project.moveDirectory(name, target)
881 return False 881 return False
882 882
883 from .HgTagDialog import HgTagDialog 883 from .HgTagDialog import HgTagDialog
884 dlg = HgTagDialog(self.hgGetTagsList(repodir, withType=True), 884 dlg = HgTagDialog(self.hgGetTagsList(repodir, withType=True),
885 revision, tagName) 885 revision, tagName)
886 if dlg.exec_() == QDialog.Accepted: 886 if dlg.exec() == QDialog.Accepted:
887 tag, revision, tagOp, force = dlg.getParameters() 887 tag, revision, tagOp, force = dlg.getParameters()
888 else: 888 else:
889 return False 889 return False
890 890
891 args = self.initCommand("tag") 891 args = self.initCommand("tag")
913 913
914 dia = HgDialog(self.tr('Tagging in the Mercurial repository'), 914 dia = HgDialog(self.tr('Tagging in the Mercurial repository'),
915 self) 915 self)
916 res = dia.startProcess(args, repodir) 916 res = dia.startProcess(args, repodir)
917 if res: 917 if res:
918 dia.exec_() 918 dia.exec()
919 919
920 return True 920 return True
921 921
922 def hgRevert(self, name): 922 def hgRevert(self, name):
923 """ 923 """
958 self.tr("Revert changes"), 958 self.tr("Revert changes"),
959 self.tr( 959 self.tr(
960 "Do you really want to revert all changes to these files" 960 "Do you really want to revert all changes to these files"
961 " or directories?"), 961 " or directories?"),
962 names) 962 names)
963 yes = dlg.exec_() == QDialog.Accepted 963 yes = dlg.exec() == QDialog.Accepted
964 else: 964 else:
965 yes = E5MessageBox.yesNo( 965 yes = E5MessageBox.yesNo(
966 None, 966 None,
967 self.tr("Revert changes"), 967 self.tr("Revert changes"),
968 self.tr("""Do you really want to revert all changes of""" 968 self.tr("""Do you really want to revert all changes of"""
969 """ the project?""")) 969 """ the project?"""))
970 if yes: 970 if yes:
971 dia = HgDialog(self.tr('Reverting changes'), self) 971 dia = HgDialog(self.tr('Reverting changes'), self)
972 res = dia.startProcess(args, repodir) 972 res = dia.startProcess(args, repodir)
973 if res: 973 if res:
974 dia.exec_() 974 dia.exec()
975 res = dia.hasAddOrDelete() 975 res = dia.hasAddOrDelete()
976 self.checkVCSStatus() 976 self.checkVCSStatus()
977 else: 977 else:
978 res = False 978 res = False
979 979
1000 if not rev: 1000 if not rev:
1001 from .HgMergeDialog import HgMergeDialog 1001 from .HgMergeDialog import HgMergeDialog
1002 dlg = HgMergeDialog(self.hgGetTagsList(repodir), 1002 dlg = HgMergeDialog(self.hgGetTagsList(repodir),
1003 self.hgGetBranchesList(repodir), 1003 self.hgGetBranchesList(repodir),
1004 self.hgGetBookmarksList(repodir)) 1004 self.hgGetBookmarksList(repodir))
1005 if dlg.exec_() == QDialog.Accepted: 1005 if dlg.exec() == QDialog.Accepted:
1006 rev, force = dlg.getParameters() 1006 rev, force = dlg.getParameters()
1007 else: 1007 else:
1008 return 1008 return
1009 else: 1009 else:
1010 force = False 1010 force = False
1020 args.append(rev) 1020 args.append(rev)
1021 1021
1022 dia = HgDialog(self.tr('Merging').format(name), self) 1022 dia = HgDialog(self.tr('Merging').format(name), self)
1023 res = dia.startProcess(args, repodir) 1023 res = dia.startProcess(args, repodir)
1024 if res: 1024 if res:
1025 dia.exec_() 1025 dia.exec()
1026 self.checkVCSStatus() 1026 self.checkVCSStatus()
1027 1027
1028 def hgReMerge(self, name): 1028 def hgReMerge(self, name):
1029 """ 1029 """
1030 Public method used to merge a URL/revision into the local project. 1030 Public method used to merge a URL/revision into the local project.
1062 self.tr("Re-Merge"), 1062 self.tr("Re-Merge"),
1063 self.tr( 1063 self.tr(
1064 "Do you really want to re-merge these files" 1064 "Do you really want to re-merge these files"
1065 " or directories?"), 1065 " or directories?"),
1066 names) 1066 names)
1067 yes = dlg.exec_() == QDialog.Accepted 1067 yes = dlg.exec() == QDialog.Accepted
1068 else: 1068 else:
1069 yes = E5MessageBox.yesNo( 1069 yes = E5MessageBox.yesNo(
1070 None, 1070 None,
1071 self.tr("Re-Merge"), 1071 self.tr("Re-Merge"),
1072 self.tr("""Do you really want to re-merge the project?""")) 1072 self.tr("""Do you really want to re-merge the project?"""))
1073 if yes: 1073 if yes:
1074 dia = HgDialog(self.tr('Re-Merging').format(name), self) 1074 dia = HgDialog(self.tr('Re-Merging').format(name), self)
1075 res = dia.startProcess(args, repodir) 1075 res = dia.startProcess(args, repodir)
1076 if res: 1076 if res:
1077 dia.exec_() 1077 dia.exec()
1078 self.checkVCSStatus() 1078 self.checkVCSStatus()
1079 1079
1080 def vcsSwitch(self, name): 1080 def vcsSwitch(self, name):
1081 """ 1081 """
1082 Public method used to switch a working directory to a different 1082 Public method used to switch a working directory to a different
1098 from .HgRevisionSelectionDialog import HgRevisionSelectionDialog 1098 from .HgRevisionSelectionDialog import HgRevisionSelectionDialog
1099 dlg = HgRevisionSelectionDialog(self.hgGetTagsList(repodir), 1099 dlg = HgRevisionSelectionDialog(self.hgGetTagsList(repodir),
1100 self.hgGetBranchesList(repodir), 1100 self.hgGetBranchesList(repodir),
1101 self.hgGetBookmarksList(repodir), 1101 self.hgGetBookmarksList(repodir),
1102 self.tr("Current branch tip")) 1102 self.tr("Current branch tip"))
1103 if dlg.exec_() == QDialog.Accepted: 1103 if dlg.exec() == QDialog.Accepted:
1104 rev = dlg.getRevision() 1104 rev = dlg.getRevision()
1105 return self.vcsUpdate(name, revision=rev) 1105 return self.vcsUpdate(name, revision=rev)
1106 1106
1107 return False 1107 return False
1108 1108
1274 1274
1275 @param name directory name of the working directory (string) 1275 @param name directory name of the working directory (string)
1276 """ 1276 """
1277 from .HgCommandDialog import HgCommandDialog 1277 from .HgCommandDialog import HgCommandDialog
1278 dlg = HgCommandDialog(self.commandHistory, name) 1278 dlg = HgCommandDialog(self.commandHistory, name)
1279 if dlg.exec_() == QDialog.Accepted: 1279 if dlg.exec() == QDialog.Accepted:
1280 command = dlg.getData() 1280 command = dlg.getData()
1281 commandList = Utilities.parseOptionString(command) 1281 commandList = Utilities.parseOptionString(command)
1282 1282
1283 # This moves any previous occurrence of these arguments to the head 1283 # This moves any previous occurrence of these arguments to the head
1284 # of the list. 1284 # of the list.
1297 return 1297 return
1298 1298
1299 dia = HgDialog(self.tr('Mercurial command'), self) 1299 dia = HgDialog(self.tr('Mercurial command'), self)
1300 res = dia.startProcess(args, repodir) 1300 res = dia.startProcess(args, repodir)
1301 if res: 1301 if res:
1302 dia.exec_() 1302 dia.exec()
1303 1303
1304 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): 1304 def vcsOptionsDialog(self, project, archive, editable=False, parent=None):
1305 """ 1305 """
1306 Public method to get a dialog to enter repository info. 1306 Public method to get a dialog to enter repository info.
1307 1307
1439 @return flag indicating successful operation (boolean) 1439 @return flag indicating successful operation (boolean)
1440 """ 1440 """
1441 from .HgCopyDialog import HgCopyDialog 1441 from .HgCopyDialog import HgCopyDialog
1442 dlg = HgCopyDialog(name) 1442 dlg = HgCopyDialog(name)
1443 res = False 1443 res = False
1444 if dlg.exec_() == QDialog.Accepted: 1444 if dlg.exec() == QDialog.Accepted:
1445 target, force = dlg.getData() 1445 target, force = dlg.getData()
1446 1446
1447 args = self.initCommand("copy") 1447 args = self.initCommand("copy")
1448 args.append("-v") 1448 args.append("-v")
1449 args.append(name) 1449 args.append(name)
1459 1459
1460 dia = HgDialog( 1460 dia = HgDialog(
1461 self.tr('Copying {0}').format(name), self) 1461 self.tr('Copying {0}').format(name), self)
1462 res = dia.startProcess(args, repodir) 1462 res = dia.startProcess(args, repodir)
1463 if res: 1463 if res:
1464 dia.exec_() 1464 dia.exec()
1465 res = dia.normalExit() 1465 res = dia.normalExit()
1466 if ( 1466 if (
1467 res and 1467 res and
1468 target.startswith(project.getProjectPath()) 1468 target.startswith(project.getProjectPath())
1469 ): 1469 ):
1623 1623
1624 from .HgRevisionsSelectionDialog import HgRevisionsSelectionDialog 1624 from .HgRevisionsSelectionDialog import HgRevisionsSelectionDialog
1625 dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(repodir), 1625 dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(repodir),
1626 self.hgGetBranchesList(repodir), 1626 self.hgGetBranchesList(repodir),
1627 self.hgGetBookmarksList(repodir)) 1627 self.hgGetBookmarksList(repodir))
1628 if dlg.exec_() == QDialog.Accepted: 1628 if dlg.exec() == QDialog.Accepted:
1629 revisions = dlg.getRevisions() 1629 revisions = dlg.getRevisions()
1630 if self.diff is None: 1630 if self.diff is None:
1631 from .HgDiffDialog import HgDiffDialog 1631 from .HgDiffDialog import HgDiffDialog
1632 self.diff = HgDiffDialog(self) 1632 self.diff = HgDiffDialog(self)
1633 self.diff.show() 1633 self.diff.show()
1677 1677
1678 from .HgRevisionsSelectionDialog import HgRevisionsSelectionDialog 1678 from .HgRevisionsSelectionDialog import HgRevisionsSelectionDialog
1679 dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(repodir), 1679 dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(repodir),
1680 self.hgGetBranchesList(repodir), 1680 self.hgGetBranchesList(repodir),
1681 self.hgGetBookmarksList(repodir)) 1681 self.hgGetBookmarksList(repodir))
1682 if dlg.exec_() == QDialog.Accepted: 1682 if dlg.exec() == QDialog.Accepted:
1683 rev1, rev2 = dlg.getRevisions() 1683 rev1, rev2 = dlg.getRevisions()
1684 else: 1684 else:
1685 return 1685 return
1686 elif revisions: 1686 elif revisions:
1687 rev1, rev2 = revisions[0], revisions[1] 1687 rev1, rev2 = revisions[0], revisions[1]
1817 return False 1817 return False
1818 1818
1819 dia = HgDialog(title, self) 1819 dia = HgDialog(title, self)
1820 res = dia.startProcess(args, repodir) 1820 res = dia.startProcess(args, repodir)
1821 if res: 1821 if res:
1822 dia.exec_() 1822 dia.exec()
1823 res = dia.hasAddOrDelete() 1823 res = dia.hasAddOrDelete()
1824 if ( 1824 if (
1825 self.bundleFile and 1825 self.bundleFile and
1826 os.path.exists(self.bundleFile) 1826 os.path.exists(self.bundleFile)
1827 ): 1827 ):
1858 1858
1859 dia = HgDialog( 1859 dia = HgDialog(
1860 self.tr('Pushing to a remote Mercurial repository'), self) 1860 self.tr('Pushing to a remote Mercurial repository'), self)
1861 res = dia.startProcess(args, repodir) 1861 res = dia.startProcess(args, repodir)
1862 if res: 1862 if res:
1863 dia.exec_() 1863 dia.exec()
1864 self.checkVCSStatus() 1864 self.checkVCSStatus()
1865 1865
1866 def hgInfo(self, ppath, mode="heads"): 1866 def hgInfo(self, ppath, mode="heads"):
1867 """ 1867 """
1868 Public method to show information about the heads of the repository. 1868 Public method to show information about the heads of the repository.
1936 """<tr><td><b>Committed time</b></td><td>{2}</td></tr>\n""" 1936 """<tr><td><b>Committed time</b></td><td>{2}</td></tr>\n"""
1937 """</table></p>""") 1937 """</table></p>""")
1938 .format(author, cdate, ctime)) 1938 .format(author, cdate, ctime))
1939 1939
1940 dlg = VcsRepositoryInfoDialog(None, "\n".join(info)) 1940 dlg = VcsRepositoryInfoDialog(None, "\n".join(info))
1941 dlg.exec_() 1941 dlg.exec()
1942 1942
1943 def hgConflicts(self, name): 1943 def hgConflicts(self, name):
1944 """ 1944 """
1945 Public method used to show a list of files containing conflicts. 1945 Public method used to show a list of files containing conflicts.
1946 1946
1986 else: 1986 else:
1987 title = self.tr("Marking as 'resolved'") 1987 title = self.tr("Marking as 'resolved'")
1988 dia = HgDialog(title, self) 1988 dia = HgDialog(title, self)
1989 res = dia.startProcess(args, repodir) 1989 res = dia.startProcess(args, repodir)
1990 if res: 1990 if res:
1991 dia.exec_() 1991 dia.exec()
1992 self.checkVCSStatus() 1992 self.checkVCSStatus()
1993 1993
1994 def hgAbortMerge(self, name): 1994 def hgAbortMerge(self, name):
1995 """ 1995 """
1996 Public method to abort an uncommitted merge. 1996 Public method to abort an uncommitted merge.
2018 dia = HgDialog( 2018 dia = HgDialog(
2019 self.tr('Aborting uncommitted merge'), 2019 self.tr('Aborting uncommitted merge'),
2020 self) 2020 self)
2021 res = dia.startProcess(args, repodir, False) 2021 res = dia.startProcess(args, repodir, False)
2022 if res: 2022 if res:
2023 dia.exec_() 2023 dia.exec()
2024 res = dia.hasAddOrDelete() 2024 res = dia.hasAddOrDelete()
2025 self.checkVCSStatus() 2025 self.checkVCSStatus()
2026 return res 2026 return res
2027 2027
2028 def hgBranch(self, name): 2028 def hgBranch(self, name):
2040 if os.path.splitdrive(repodir)[1] == os.sep: 2040 if os.path.splitdrive(repodir)[1] == os.sep:
2041 return 2041 return
2042 2042
2043 from .HgBranchInputDialog import HgBranchInputDialog 2043 from .HgBranchInputDialog import HgBranchInputDialog
2044 dlg = HgBranchInputDialog(self.hgGetBranchesList(repodir)) 2044 dlg = HgBranchInputDialog(self.hgGetBranchesList(repodir))
2045 if dlg.exec_() == QDialog.Accepted: 2045 if dlg.exec() == QDialog.Accepted:
2046 name, commit = dlg.getData() 2046 name, commit = dlg.getData()
2047 name = name.strip().replace(" ", "_") 2047 name = name.strip().replace(" ", "_")
2048 args = self.initCommand("branch") 2048 args = self.initCommand("branch")
2049 args.append(name) 2049 args.append(name)
2050 2050
2051 dia = HgDialog( 2051 dia = HgDialog(
2052 self.tr('Creating branch in the Mercurial repository'), 2052 self.tr('Creating branch in the Mercurial repository'),
2053 self) 2053 self)
2054 res = dia.startProcess(args, repodir) 2054 res = dia.startProcess(args, repodir)
2055 if res: 2055 if res:
2056 dia.exec_() 2056 dia.exec()
2057 if commit: 2057 if commit:
2058 self.vcsCommit( 2058 self.vcsCommit(
2059 repodir, 2059 repodir,
2060 self.tr("Created new branch <{0}>.").format( 2060 self.tr("Created new branch <{0}>.").format(
2061 name)) 2061 name))
2078 args = self.initCommand("branch") 2078 args = self.initCommand("branch")
2079 2079
2080 dia = HgDialog(self.tr('Showing current branch'), self) 2080 dia = HgDialog(self.tr('Showing current branch'), self)
2081 res = dia.startProcess(args, repodir, False) 2081 res = dia.startProcess(args, repodir, False)
2082 if res: 2082 if res:
2083 dia.exec_() 2083 dia.exec()
2084 2084
2085 def hgGetCurrentBranch(self, repodir): 2085 def hgGetCurrentBranch(self, repodir):
2086 """ 2086 """
2087 Public method to get the current branch of the working directory. 2087 Public method to get the current branch of the working directory.
2088 2088
2101 """ 2101 """
2102 Public method used to edit the user configuration file. 2102 Public method used to edit the user configuration file.
2103 """ 2103 """
2104 from .HgUserConfigDialog import HgUserConfigDialog 2104 from .HgUserConfigDialog import HgUserConfigDialog
2105 dlg = HgUserConfigDialog(version=self.version) 2105 dlg = HgUserConfigDialog(version=self.version)
2106 dlg.exec_() 2106 dlg.exec()
2107 2107
2108 def hgEditConfig(self, name, withLargefiles=True, largefilesData=None): 2108 def hgEditConfig(self, name, withLargefiles=True, largefilesData=None):
2109 """ 2109 """
2110 Public method used to edit the repository configuration file. 2110 Public method used to edit the repository configuration file.
2111 2111
2130 withLargefiles = (self.isExtensionActive("largefiles") and 2130 withLargefiles = (self.isExtensionActive("largefiles") and
2131 withLargefiles) 2131 withLargefiles)
2132 from .HgRepoConfigDataDialog import HgRepoConfigDataDialog 2132 from .HgRepoConfigDataDialog import HgRepoConfigDataDialog
2133 dlg = HgRepoConfigDataDialog(withLargefiles=withLargefiles, 2133 dlg = HgRepoConfigDataDialog(withLargefiles=withLargefiles,
2134 largefilesData=largefilesData) 2134 largefilesData=largefilesData)
2135 if dlg.exec_() == QDialog.Accepted: 2135 if dlg.exec() == QDialog.Accepted:
2136 createContents = True 2136 createContents = True
2137 defaultUrl, defaultPushUrl = dlg.getData() 2137 defaultUrl, defaultPushUrl = dlg.getData()
2138 if withLargefiles: 2138 if withLargefiles:
2139 lfMinSize, lfPattern = dlg.getLargefilesData() 2139 lfMinSize, lfPattern = dlg.getLargefilesData()
2140 else: 2140 else:
2188 dia = HgDialog( 2188 dia = HgDialog(
2189 self.tr('Verifying the integrity of the Mercurial repository'), 2189 self.tr('Verifying the integrity of the Mercurial repository'),
2190 self) 2190 self)
2191 res = dia.startProcess(args, repodir) 2191 res = dia.startProcess(args, repodir)
2192 if res: 2192 if res:
2193 dia.exec_() 2193 dia.exec()
2194 2194
2195 def hgShowConfig(self, name): 2195 def hgShowConfig(self, name):
2196 """ 2196 """
2197 Public method to show the combined configuration. 2197 Public method to show the combined configuration.
2198 2198
2213 dia = HgDialog( 2213 dia = HgDialog(
2214 self.tr('Showing the combined configuration settings'), 2214 self.tr('Showing the combined configuration settings'),
2215 self) 2215 self)
2216 res = dia.startProcess(args, repodir, False) 2216 res = dia.startProcess(args, repodir, False)
2217 if res: 2217 if res:
2218 dia.exec_() 2218 dia.exec()
2219 2219
2220 def hgShowPaths(self, name): 2220 def hgShowPaths(self, name):
2221 """ 2221 """
2222 Public method to show the path aliases for remote repositories. 2222 Public method to show the path aliases for remote repositories.
2223 2223
2237 dia = HgDialog( 2237 dia = HgDialog(
2238 self.tr('Showing aliases for remote repositories'), 2238 self.tr('Showing aliases for remote repositories'),
2239 self) 2239 self)
2240 res = dia.startProcess(args, repodir, False) 2240 res = dia.startProcess(args, repodir, False)
2241 if res: 2241 if res:
2242 dia.exec_() 2242 dia.exec()
2243 2243
2244 def hgRecover(self, name): 2244 def hgRecover(self, name):
2245 """ 2245 """
2246 Public method to recover an interrupted transaction. 2246 Public method to recover an interrupted transaction.
2247 2247
2261 dia = HgDialog( 2261 dia = HgDialog(
2262 self.tr('Recovering from interrupted transaction'), 2262 self.tr('Recovering from interrupted transaction'),
2263 self) 2263 self)
2264 res = dia.startProcess(args, repodir, False) 2264 res = dia.startProcess(args, repodir, False)
2265 if res: 2265 if res:
2266 dia.exec_() 2266 dia.exec()
2267 2267
2268 def hgIdentify(self, name): 2268 def hgIdentify(self, name):
2269 """ 2269 """
2270 Public method to identify the current working directory. 2270 Public method to identify the current working directory.
2271 2271
2283 args = self.initCommand("identify") 2283 args = self.initCommand("identify")
2284 2284
2285 dia = HgDialog(self.tr('Identifying project directory'), self) 2285 dia = HgDialog(self.tr('Identifying project directory'), self)
2286 res = dia.startProcess(args, repodir, False) 2286 res = dia.startProcess(args, repodir, False)
2287 if res: 2287 if res:
2288 dia.exec_() 2288 dia.exec()
2289 2289
2290 def hgCreateIgnoreFile(self, name, autoAdd=False): 2290 def hgCreateIgnoreFile(self, name, autoAdd=False):
2291 """ 2291 """
2292 Public method to create the ignore file. 2292 Public method to create the ignore file.
2293 2293
2362 from .HgBundleDialog import HgBundleDialog 2362 from .HgBundleDialog import HgBundleDialog
2363 dlg = HgBundleDialog(self.hgGetTagsList(repodir), 2363 dlg = HgBundleDialog(self.hgGetTagsList(repodir),
2364 self.hgGetBranchesList(repodir), 2364 self.hgGetBranchesList(repodir),
2365 self.hgGetBookmarksList(repodir), 2365 self.hgGetBookmarksList(repodir),
2366 version=self.version) 2366 version=self.version)
2367 if dlg.exec_() != QDialog.Accepted: 2367 if dlg.exec() != QDialog.Accepted:
2368 return 2368 return
2369 2369
2370 revs, baseRevs, compression, bundleAll = dlg.getParameters() 2370 revs, baseRevs, compression, bundleAll = dlg.getParameters()
2371 else: 2371 else:
2372 revs = bundleData["revs"] 2372 revs = bundleData["revs"]
2421 args.append(fname) 2421 args.append(fname)
2422 2422
2423 dia = HgDialog(self.tr('Create changegroup'), self) 2423 dia = HgDialog(self.tr('Create changegroup'), self)
2424 res = dia.startProcess(args, repodir) 2424 res = dia.startProcess(args, repodir)
2425 if res: 2425 if res:
2426 dia.exec_() 2426 dia.exec()
2427 2427
2428 def hgPreviewBundle(self, name): 2428 def hgPreviewBundle(self, name):
2429 """ 2429 """
2430 Public method used to view the log of incoming changes from a 2430 Public method used to view the log of incoming changes from a
2431 changegroup file. 2431 changegroup file.
2502 args.extend(files) 2502 args.extend(files)
2503 2503
2504 dia = HgDialog(self.tr('Apply changegroups'), self) 2504 dia = HgDialog(self.tr('Apply changegroups'), self)
2505 res = dia.startProcess(args, repodir) 2505 res = dia.startProcess(args, repodir)
2506 if res: 2506 if res:
2507 dia.exec_() 2507 dia.exec()
2508 res = dia.hasAddOrDelete() 2508 res = dia.hasAddOrDelete()
2509 self.checkVCSStatus() 2509 self.checkVCSStatus()
2510 2510
2511 return res 2511 return res
2512 2512
2537 if subcommand in ("good", "bad", "skip"): 2537 if subcommand in ("good", "bad", "skip"):
2538 from .HgRevisionSelectionDialog import HgRevisionSelectionDialog 2538 from .HgRevisionSelectionDialog import HgRevisionSelectionDialog
2539 dlg = HgRevisionSelectionDialog(self.hgGetTagsList(repodir), 2539 dlg = HgRevisionSelectionDialog(self.hgGetTagsList(repodir),
2540 self.hgGetBranchesList(repodir), 2540 self.hgGetBranchesList(repodir),
2541 self.hgGetBookmarksList(repodir)) 2541 self.hgGetBookmarksList(repodir))
2542 if dlg.exec_() == QDialog.Accepted: 2542 if dlg.exec() == QDialog.Accepted:
2543 rev = dlg.getRevision() 2543 rev = dlg.getRevision()
2544 else: 2544 else:
2545 return 2545 return
2546 2546
2547 args = self.initCommand("bisect") 2547 args = self.initCommand("bisect")
2551 2551
2552 dia = HgDialog( 2552 dia = HgDialog(
2553 self.tr('Mercurial Bisect ({0})').format(subcommand), self) 2553 self.tr('Mercurial Bisect ({0})').format(subcommand), self)
2554 res = dia.startProcess(args, repodir) 2554 res = dia.startProcess(args, repodir)
2555 if res: 2555 if res:
2556 dia.exec_() 2556 dia.exec()
2557 2557
2558 def hgForget(self, name): 2558 def hgForget(self, name):
2559 """ 2559 """
2560 Public method used to remove a file from the Mercurial repository. 2560 Public method used to remove a file from the Mercurial repository.
2561 2561
2584 dia = HgDialog( 2584 dia = HgDialog(
2585 self.tr('Removing files from the Mercurial repository only'), 2585 self.tr('Removing files from the Mercurial repository only'),
2586 self) 2586 self)
2587 res = dia.startProcess(args, repodir) 2587 res = dia.startProcess(args, repodir)
2588 if res: 2588 if res:
2589 dia.exec_() 2589 dia.exec()
2590 if isinstance(name, list): 2590 if isinstance(name, list):
2591 self.__forgotNames.extend(name) 2591 self.__forgotNames.extend(name)
2592 else: 2592 else:
2593 self.__forgotNames.append(name) 2593 self.__forgotNames.append(name)
2594 2594
2610 2610
2611 from .HgBackoutDialog import HgBackoutDialog 2611 from .HgBackoutDialog import HgBackoutDialog
2612 dlg = HgBackoutDialog(self.hgGetTagsList(repodir), 2612 dlg = HgBackoutDialog(self.hgGetTagsList(repodir),
2613 self.hgGetBranchesList(repodir), 2613 self.hgGetBranchesList(repodir),
2614 self.hgGetBookmarksList(repodir)) 2614 self.hgGetBookmarksList(repodir))
2615 if dlg.exec_() == QDialog.Accepted: 2615 if dlg.exec() == QDialog.Accepted:
2616 rev, merge, date, user, message = dlg.getParameters() 2616 rev, merge, date, user, message = dlg.getParameters()
2617 if not rev: 2617 if not rev:
2618 E5MessageBox.warning( 2618 E5MessageBox.warning(
2619 self.__ui, 2619 self.__ui,
2620 self.tr("Backing out changeset"), 2620 self.tr("Backing out changeset"),
2636 args.append(rev) 2636 args.append(rev)
2637 2637
2638 dia = HgDialog(self.tr('Backing out changeset'), self) 2638 dia = HgDialog(self.tr('Backing out changeset'), self)
2639 res = dia.startProcess(args, repodir) 2639 res = dia.startProcess(args, repodir)
2640 if res: 2640 if res:
2641 dia.exec_() 2641 dia.exec()
2642 2642
2643 def hgRollback(self, name): 2643 def hgRollback(self, name):
2644 """ 2644 """
2645 Public method used to rollback the last transaction. 2645 Public method used to rollback the last transaction.
2646 2646
2663 icon=E5MessageBox.Warning) 2663 icon=E5MessageBox.Warning)
2664 if res: 2664 if res:
2665 dia = HgDialog(self.tr('Rollback last transaction'), self) 2665 dia = HgDialog(self.tr('Rollback last transaction'), self)
2666 res = dia.startProcess(["rollback"], repodir) 2666 res = dia.startProcess(["rollback"], repodir)
2667 if res: 2667 if res:
2668 dia.exec_() 2668 dia.exec()
2669 2669
2670 def hgServe(self, name): 2670 def hgServe(self, name):
2671 """ 2671 """
2672 Public method used to serve the project. 2672 Public method used to serve the project.
2673 2673
2703 if os.path.splitdrive(repodir)[1] == os.sep: 2703 if os.path.splitdrive(repodir)[1] == os.sep:
2704 return False 2704 return False
2705 2705
2706 from .HgImportDialog import HgImportDialog 2706 from .HgImportDialog import HgImportDialog
2707 dlg = HgImportDialog(self) 2707 dlg = HgImportDialog(self)
2708 if dlg.exec_() == QDialog.Accepted: 2708 if dlg.exec() == QDialog.Accepted:
2709 (patchFile, noCommit, message, date, user, withSecret, stripCount, 2709 (patchFile, noCommit, message, date, user, withSecret, stripCount,
2710 force) = dlg.getParameters() 2710 force) = dlg.getParameters()
2711 2711
2712 args = self.initCommand("import") 2712 args = self.initCommand("import")
2713 args.append("--verbose") 2713 args.append("--verbose")
2733 args.append(patchFile) 2733 args.append(patchFile)
2734 2734
2735 dia = HgDialog(self.tr("Import Patch"), self) 2735 dia = HgDialog(self.tr("Import Patch"), self)
2736 res = dia.startProcess(args, repodir) 2736 res = dia.startProcess(args, repodir)
2737 if res: 2737 if res:
2738 dia.exec_() 2738 dia.exec()
2739 res = dia.hasAddOrDelete() 2739 res = dia.hasAddOrDelete()
2740 self.checkVCSStatus() 2740 self.checkVCSStatus()
2741 else: 2741 else:
2742 res = False 2742 res = False
2743 2743
2759 return 2759 return
2760 2760
2761 from .HgExportDialog import HgExportDialog 2761 from .HgExportDialog import HgExportDialog
2762 dlg = HgExportDialog(self.hgGetBookmarksList(repodir), 2762 dlg = HgExportDialog(self.hgGetBookmarksList(repodir),
2763 self.version >= (4, 7, 0)) 2763 self.version >= (4, 7, 0))
2764 if dlg.exec_() == QDialog.Accepted: 2764 if dlg.exec() == QDialog.Accepted:
2765 (filePattern, revisions, bookmark, switchParent, allText, 2765 (filePattern, revisions, bookmark, switchParent, allText,
2766 noDates, git) = dlg.getParameters() 2766 noDates, git) = dlg.getParameters()
2767 2767
2768 args = self.initCommand("export") 2768 args = self.initCommand("export")
2769 args.append("--output") 2769 args.append("--output")
2785 args.append(rev) 2785 args.append(rev)
2786 2786
2787 dia = HgDialog(self.tr("Export Patches"), self) 2787 dia = HgDialog(self.tr("Export Patches"), self)
2788 res = dia.startProcess(args, repodir) 2788 res = dia.startProcess(args, repodir)
2789 if res: 2789 if res:
2790 dia.exec_() 2790 dia.exec()
2791 2791
2792 def hgPhase(self, name, data=None): 2792 def hgPhase(self, name, data=None):
2793 """ 2793 """
2794 Public method to change the phase of revisions. 2794 Public method to change the phase of revisions.
2795 2795
2809 return False 2809 return False
2810 2810
2811 if data is None: 2811 if data is None:
2812 from .HgPhaseDialog import HgPhaseDialog 2812 from .HgPhaseDialog import HgPhaseDialog
2813 dlg = HgPhaseDialog() 2813 dlg = HgPhaseDialog()
2814 if dlg.exec_() == QDialog.Accepted: 2814 if dlg.exec() == QDialog.Accepted:
2815 data = dlg.getData() 2815 data = dlg.getData()
2816 2816
2817 if data: 2817 if data:
2818 revs, phase, force = data 2818 revs, phase, force = data
2819 2819
2832 args.append(rev) 2832 args.append(rev)
2833 2833
2834 dia = HgDialog(self.tr("Change Phase"), self) 2834 dia = HgDialog(self.tr("Change Phase"), self)
2835 res = dia.startProcess(args, repodir) 2835 res = dia.startProcess(args, repodir)
2836 if res: 2836 if res:
2837 dia.exec_() 2837 dia.exec()
2838 res = dia.normalExitWithoutErrors() 2838 res = dia.normalExitWithoutErrors()
2839 else: 2839 else:
2840 res = False 2840 res = False
2841 2841
2842 return res 2842 return res
2858 return False 2858 return False
2859 2859
2860 from .HgGraftDialog import HgGraftDialog 2860 from .HgGraftDialog import HgGraftDialog
2861 res = False 2861 res = False
2862 dlg = HgGraftDialog(self, revs) 2862 dlg = HgGraftDialog(self, revs)
2863 if dlg.exec_() == QDialog.Accepted: 2863 if dlg.exec() == QDialog.Accepted:
2864 (revs, 2864 (revs,
2865 (userData, currentUser, userName), 2865 (userData, currentUser, userName),
2866 (dateData, currentDate, dateStr), 2866 (dateData, currentDate, dateStr),
2867 log, dryrun, noCommit) = dlg.getData() 2867 log, dryrun, noCommit) = dlg.getData()
2868 2868
2889 args.extend(revs) 2889 args.extend(revs)
2890 2890
2891 dia = HgDialog(self.tr('Copy Changesets'), self) 2891 dia = HgDialog(self.tr('Copy Changesets'), self)
2892 res = dia.startProcess(args, repodir) 2892 res = dia.startProcess(args, repodir)
2893 if res: 2893 if res:
2894 dia.exec_() 2894 dia.exec()
2895 res = dia.hasAddOrDelete() 2895 res = dia.hasAddOrDelete()
2896 self.checkVCSStatus() 2896 self.checkVCSStatus()
2897 return res 2897 return res
2898 2898
2899 def __hgGraftSubCommand(self, path, subcommand, title): 2899 def __hgGraftSubCommand(self, path, subcommand, title):
2921 args.append("--verbose") 2921 args.append("--verbose")
2922 2922
2923 dia = HgDialog(title, self) 2923 dia = HgDialog(title, self)
2924 res = dia.startProcess(args, repodir) 2924 res = dia.startProcess(args, repodir)
2925 if res: 2925 if res:
2926 dia.exec_() 2926 dia.exec()
2927 res = dia.hasAddOrDelete() 2927 res = dia.hasAddOrDelete()
2928 self.checkVCSStatus() 2928 self.checkVCSStatus()
2929 return res 2929 return res
2930 2930
2931 def hgGraftContinue(self, path): 2931 def hgGraftContinue(self, path):
2976 if os.path.splitdrive(repodir)[1] == os.sep: 2976 if os.path.splitdrive(repodir)[1] == os.sep:
2977 return 2977 return
2978 2978
2979 from .HgArchiveDialog import HgArchiveDialog 2979 from .HgArchiveDialog import HgArchiveDialog
2980 dlg = HgArchiveDialog(self) 2980 dlg = HgArchiveDialog(self)
2981 if dlg.exec_() == QDialog.Accepted: 2981 if dlg.exec() == QDialog.Accepted:
2982 archive, type_, prefix, subrepos = dlg.getData() 2982 archive, type_, prefix, subrepos = dlg.getData()
2983 2983
2984 args = self.initCommand("archive") 2984 args = self.initCommand("archive")
2985 if type_: 2985 if type_:
2986 args.append("--type") 2986 args.append("--type")
2993 args.append(archive) 2993 args.append(archive)
2994 2994
2995 dia = HgDialog(self.tr("Create Unversioned Archive"), self) 2995 dia = HgDialog(self.tr("Create Unversioned Archive"), self)
2996 res = dia.startProcess(args, repodir) 2996 res = dia.startProcess(args, repodir)
2997 if res: 2997 if res:
2998 dia.exec_() 2998 dia.exec()
2999 2999
3000 def hgDeleteBackups(self): 3000 def hgDeleteBackups(self):
3001 """ 3001 """
3002 Public method to delete all backup bundles in the backup area. 3002 Public method to delete all backup bundles in the backup area.
3003 """ 3003 """
3047 """ 3047 """
3048 from .HgAddSubrepositoryDialog import HgAddSubrepositoryDialog 3048 from .HgAddSubrepositoryDialog import HgAddSubrepositoryDialog
3049 ppath = self.__projectHelper.getProject().getProjectPath() 3049 ppath = self.__projectHelper.getProject().getProjectPath()
3050 hgsub = self.getHgSubPath() 3050 hgsub = self.getHgSubPath()
3051 dlg = HgAddSubrepositoryDialog(ppath) 3051 dlg = HgAddSubrepositoryDialog(ppath)
3052 if dlg.exec_() == QDialog.Accepted: 3052 if dlg.exec() == QDialog.Accepted:
3053 relPath, subrepoType, subrepoUrl = dlg.getData() 3053 relPath, subrepoType, subrepoUrl = dlg.getData()
3054 if subrepoType == "hg": 3054 if subrepoType == "hg":
3055 url = subrepoUrl 3055 url = subrepoUrl
3056 else: 3056 else:
3057 url = "[{0}]{1}".format(subrepoType, subrepoUrl) 3057 url = "[{0}]{1}".format(subrepoType, subrepoUrl)
3138 3138
3139 from .HgRemoveSubrepositoriesDialog import ( 3139 from .HgRemoveSubrepositoriesDialog import (
3140 HgRemoveSubrepositoriesDialog 3140 HgRemoveSubrepositoriesDialog
3141 ) 3141 )
3142 dlg = HgRemoveSubrepositoriesDialog(subrepositories) 3142 dlg = HgRemoveSubrepositoriesDialog(subrepositories)
3143 if dlg.exec_() == QDialog.Accepted: 3143 if dlg.exec() == QDialog.Accepted:
3144 subrepositories, removedSubrepos, deleteSubrepos = dlg.getData() 3144 subrepositories, removedSubrepos, deleteSubrepos = dlg.getData()
3145 contents = "\n".join(subrepositories) + "\n" 3145 contents = "\n".join(subrepositories) + "\n"
3146 try: 3146 try:
3147 f = open(hgsub, "w") 3147 f = open(hgsub, "w")
3148 f.write(contents) 3148 f.write(contents)
3492 from .HgBookmarkDialog import HgBookmarkDialog 3492 from .HgBookmarkDialog import HgBookmarkDialog
3493 dlg = HgBookmarkDialog(HgBookmarkDialog.DEFINE_MODE, 3493 dlg = HgBookmarkDialog(HgBookmarkDialog.DEFINE_MODE,
3494 self.hgGetTagsList(repodir), 3494 self.hgGetTagsList(repodir),
3495 self.hgGetBranchesList(repodir), 3495 self.hgGetBranchesList(repodir),
3496 self.hgGetBookmarksList(repodir)) 3496 self.hgGetBookmarksList(repodir))
3497 if dlg.exec_() == QDialog.Accepted: 3497 if dlg.exec() == QDialog.Accepted:
3498 revision, bookmark = dlg.getData() 3498 revision, bookmark = dlg.getData()
3499 ok = True 3499 ok = True
3500 else: 3500 else:
3501 ok = False 3501 ok = False
3502 3502
3508 args.append(bookmark) 3508 args.append(bookmark)
3509 3509
3510 dia = HgDialog(self.tr('Mercurial Bookmark'), self) 3510 dia = HgDialog(self.tr('Mercurial Bookmark'), self)
3511 res = dia.startProcess(args, repodir) 3511 res = dia.startProcess(args, repodir)
3512 if res: 3512 if res:
3513 dia.exec_() 3513 dia.exec()
3514 3514
3515 def hgBookmarkDelete(self, name, bookmark=None): 3515 def hgBookmarkDelete(self, name, bookmark=None):
3516 """ 3516 """
3517 Public method to delete a bookmark. 3517 Public method to delete a bookmark.
3518 3518
3541 args.append(bookmark) 3541 args.append(bookmark)
3542 3542
3543 dia = HgDialog(self.tr('Delete Mercurial Bookmark'), self) 3543 dia = HgDialog(self.tr('Delete Mercurial Bookmark'), self)
3544 res = dia.startProcess(args, repodir) 3544 res = dia.startProcess(args, repodir)
3545 if res: 3545 if res:
3546 dia.exec_() 3546 dia.exec()
3547 3547
3548 def hgBookmarkRename(self, name, renameInfo=None): 3548 def hgBookmarkRename(self, name, renameInfo=None):
3549 """ 3549 """
3550 Public method to rename a bookmark. 3550 Public method to rename a bookmark.
3551 3551
3562 return 3562 return
3563 3563
3564 if not renameInfo: 3564 if not renameInfo:
3565 from .HgBookmarkRenameDialog import HgBookmarkRenameDialog 3565 from .HgBookmarkRenameDialog import HgBookmarkRenameDialog
3566 dlg = HgBookmarkRenameDialog(self.hgGetBookmarksList(repodir)) 3566 dlg = HgBookmarkRenameDialog(self.hgGetBookmarksList(repodir))
3567 if dlg.exec_() == QDialog.Accepted: 3567 if dlg.exec() == QDialog.Accepted:
3568 renameInfo = dlg.getData() 3568 renameInfo = dlg.getData()
3569 3569
3570 if renameInfo: 3570 if renameInfo:
3571 args = self.initCommand("bookmarks") 3571 args = self.initCommand("bookmarks")
3572 args.append("--rename") 3572 args.append("--rename")
3574 args.append(renameInfo[1]) 3574 args.append(renameInfo[1])
3575 3575
3576 dia = HgDialog(self.tr('Rename Mercurial Bookmark'), self) 3576 dia = HgDialog(self.tr('Rename Mercurial Bookmark'), self)
3577 res = dia.startProcess(args, repodir) 3577 res = dia.startProcess(args, repodir)
3578 if res: 3578 if res:
3579 dia.exec_() 3579 dia.exec()
3580 3580
3581 def hgBookmarkMove(self, name, revision=None, bookmark=None): 3581 def hgBookmarkMove(self, name, revision=None, bookmark=None):
3582 """ 3582 """
3583 Public method to move a bookmark. 3583 Public method to move a bookmark.
3584 3584
3599 from .HgBookmarkDialog import HgBookmarkDialog 3599 from .HgBookmarkDialog import HgBookmarkDialog
3600 dlg = HgBookmarkDialog(HgBookmarkDialog.MOVE_MODE, 3600 dlg = HgBookmarkDialog(HgBookmarkDialog.MOVE_MODE,
3601 self.hgGetTagsList(repodir), 3601 self.hgGetTagsList(repodir),
3602 self.hgGetBranchesList(repodir), 3602 self.hgGetBranchesList(repodir),
3603 self.hgGetBookmarksList(repodir)) 3603 self.hgGetBookmarksList(repodir))
3604 if dlg.exec_() == QDialog.Accepted: 3604 if dlg.exec() == QDialog.Accepted:
3605 revision, bookmark = dlg.getData() 3605 revision, bookmark = dlg.getData()
3606 ok = True 3606 ok = True
3607 else: 3607 else:
3608 ok = False 3608 ok = False
3609 3609
3616 args.append(bookmark) 3616 args.append(bookmark)
3617 3617
3618 dia = HgDialog(self.tr('Move Mercurial Bookmark'), self) 3618 dia = HgDialog(self.tr('Move Mercurial Bookmark'), self)
3619 res = dia.startProcess(args, repodir) 3619 res = dia.startProcess(args, repodir)
3620 if res: 3620 if res:
3621 dia.exec_() 3621 dia.exec()
3622 3622
3623 def hgBookmarkIncoming(self, name): 3623 def hgBookmarkIncoming(self, name):
3624 """ 3624 """
3625 Public method to show a list of incoming bookmarks. 3625 Public method to show a list of incoming bookmarks.
3626 3626
3712 dia = HgDialog(self.tr( 3712 dia = HgDialog(self.tr(
3713 'Pulling bookmark from a remote Mercurial repository'), 3713 'Pulling bookmark from a remote Mercurial repository'),
3714 self) 3714 self)
3715 res = dia.startProcess(args, repodir) 3715 res = dia.startProcess(args, repodir)
3716 if res: 3716 if res:
3717 dia.exec_() 3717 dia.exec()
3718 3718
3719 def hgBookmarkPush(self, name, current=False, bookmark=None): 3719 def hgBookmarkPush(self, name, current=False, bookmark=None):
3720 """ 3720 """
3721 Public method to push a bookmark to a remote repository. 3721 Public method to push a bookmark to a remote repository.
3722 3722
3756 dia = HgDialog(self.tr( 3756 dia = HgDialog(self.tr(
3757 'Pushing bookmark to a remote Mercurial repository'), 3757 'Pushing bookmark to a remote Mercurial repository'),
3758 self) 3758 self)
3759 res = dia.startProcess(args, repodir) 3759 res = dia.startProcess(args, repodir)
3760 if res: 3760 if res:
3761 dia.exec_() 3761 dia.exec()

eric ide

mercurial