eric6/Plugins/VcsPlugins/vcsMercurial/HgBookmarksInOutDialog.py

changeset 7970
c4ee8a81584c
parent 7923
91e843545d9a
child 7973
e836d196e888
equal deleted inserted replaced
7969:62eff8b34a8d 7970:c4ee8a81584c
5 5
6 """ 6 """
7 Module implementing a dialog to show a list of incoming or outgoing bookmarks. 7 Module implementing a dialog to show a list of incoming or outgoing bookmarks.
8 """ 8 """
9 9
10 import os 10 ##import os
11 11 ##
12 from PyQt5.QtCore import Qt, QCoreApplication 12 from PyQt5.QtCore import Qt, QCoreApplication
13 from PyQt5.QtWidgets import ( 13 from PyQt5.QtWidgets import (
14 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem 14 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem
15 ) 15 )
16 16
69 if self.__hgClient.isExecuting(): 69 if self.__hgClient.isExecuting():
70 self.__hgClient.cancel() 70 self.__hgClient.cancel()
71 71
72 e.accept() 72 e.accept()
73 73
74 def start(self, path): 74 def start(self):
75 """ 75 """
76 Public slot to start the bookmarks command. 76 Public slot to start the bookmarks command.
77 77
78 @param path name of directory to be listed (string)
79 @exception ValueError raised to indicate an invalid dialog mode 78 @exception ValueError raised to indicate an invalid dialog mode
80 """ 79 """
81 self.errorGroup.hide() 80 self.errorGroup.hide()
82 81
83 self.intercept = False 82 self.intercept = False
84 self.activateWindow() 83 self.activateWindow()
85
86 dname, fname = self.vcs.splitPath(path)
87
88 # find the root of the repo
89 repodir = dname
90 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
91 repodir = os.path.dirname(repodir)
92 if os.path.splitdrive(repodir)[1] == os.sep:
93 return
94 84
95 if self.mode == self.INCOMING: 85 if self.mode == self.INCOMING:
96 args = self.vcs.initCommand("incoming") 86 args = self.vcs.initCommand("incoming")
97 elif self.mode == self.OUTGOING: 87 elif self.mode == self.OUTGOING:
98 args = self.vcs.initCommand("outgoing") 88 args = self.vcs.initCommand("outgoing")

eric ide

mercurial