Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 6891
93f82da09f22
parent 6645
ad476851d7e0
equal deleted inserted replaced
6890:26c1042f2eec 6891:93f82da09f22
901 # find the root of the repo 901 # find the root of the repo
902 repodir = dname 902 repodir = dname
903 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 903 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
904 repodir = os.path.dirname(repodir) 904 repodir = os.path.dirname(repodir)
905 if os.path.splitdrive(repodir)[1] == os.sep: 905 if os.path.splitdrive(repodir)[1] == os.sep:
906 return 906 return False
907 907
908 from .HgTagDialog import HgTagDialog 908 from .HgTagDialog import HgTagDialog
909 dlg = HgTagDialog(self.hgGetTagsList(repodir, withType=True), 909 dlg = HgTagDialog(self.hgGetTagsList(repodir, withType=True),
910 revision, tagName) 910 revision, tagName)
911 if dlg.exec_() == QDialog.Accepted: 911 if dlg.exec_() == QDialog.Accepted:
1748 # find the root of the repo 1748 # find the root of the repo
1749 repodir = self.splitPath(name)[0] 1749 repodir = self.splitPath(name)[0]
1750 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 1750 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
1751 repodir = os.path.dirname(repodir) 1751 repodir = os.path.dirname(repodir)
1752 if os.path.splitdrive(repodir)[1] == os.sep: 1752 if os.path.splitdrive(repodir)[1] == os.sep:
1753 return 1753 return "", ""
1754 1754
1755 process = QProcess() 1755 process = QProcess()
1756 process.setWorkingDirectory(repodir) 1756 process.setWorkingDirectory(repodir)
1757 process.start('hg', args) 1757 process.start('hg', args)
1758 procStarted = process.waitForStarted(5000) 1758 procStarted = process.waitForStarted(5000)
2143 # find the root of the repo 2143 # find the root of the repo
2144 repodir = dname 2144 repodir = dname
2145 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 2145 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
2146 repodir = os.path.dirname(repodir) 2146 repodir = os.path.dirname(repodir)
2147 if os.path.splitdrive(repodir)[1] == os.sep: 2147 if os.path.splitdrive(repodir)[1] == os.sep:
2148 return 2148 return False
2149 2149
2150 if self.version >= (4, 5, 0): 2150 if self.version >= (4, 5, 0):
2151 args = self.initCommand("merge") 2151 args = self.initCommand("merge")
2152 args.append("--abort") 2152 args.append("--abort")
2153 else: 2153 else:
2623 # find the root of the repo 2623 # find the root of the repo
2624 repodir = dname 2624 repodir = dname
2625 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 2625 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
2626 repodir = os.path.dirname(repodir) 2626 repodir = os.path.dirname(repodir)
2627 if os.path.splitdrive(repodir)[1] == os.sep: 2627 if os.path.splitdrive(repodir)[1] == os.sep:
2628 return 2628 return False
2629 2629
2630 res = False 2630 res = False
2631 if not files: 2631 if not files:
2632 files = E5FileDialog.getOpenFileNames( 2632 files = E5FileDialog.getOpenFileNames(
2633 None, 2633 None,
2848 # find the root of the repo 2848 # find the root of the repo
2849 repodir = dname 2849 repodir = dname
2850 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 2850 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
2851 repodir = os.path.dirname(repodir) 2851 repodir = os.path.dirname(repodir)
2852 if os.path.splitdrive(repodir)[1] == os.sep: 2852 if os.path.splitdrive(repodir)[1] == os.sep:
2853 return 2853 return False
2854 2854
2855 from .HgImportDialog import HgImportDialog 2855 from .HgImportDialog import HgImportDialog
2856 dlg = HgImportDialog() 2856 dlg = HgImportDialog()
2857 if dlg.exec_() == QDialog.Accepted: 2857 if dlg.exec_() == QDialog.Accepted:
2858 patchFile, noCommit, message, date, user, stripCount, force = \ 2858 patchFile, noCommit, message, date, user, stripCount, force = \
3058 # find the root of the repo 3058 # find the root of the repo
3059 repodir = self.splitPath(path)[0] 3059 repodir = self.splitPath(path)[0]
3060 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 3060 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
3061 repodir = os.path.dirname(repodir) 3061 repodir = os.path.dirname(repodir)
3062 if os.path.splitdrive(repodir)[1] == os.sep: 3062 if os.path.splitdrive(repodir)[1] == os.sep:
3063 return 3063 return False
3064 3064
3065 args = self.initCommand("graft") 3065 args = self.initCommand("graft")
3066 args.append(subcommand) 3066 args.append(subcommand)
3067 args.append("--verbose") 3067 args.append("--verbose")
3068 3068

eric ide

mercurial