Plugins/VcsPlugins/vcsMercurial/HgClient.py

changeset 3555
43473ba956ce
parent 3532
86ac124f322c
child 3656
441956d8fce5
equal deleted inserted replaced
3554:9ca56a89aec5 3555:43473ba956ce
31 OutputFormatSize = struct.calcsize(OutputFormat) 31 OutputFormatSize = struct.calcsize(OutputFormat)
32 ReturnFormat = ">i" 32 ReturnFormat = ">i"
33 33
34 Channels = (b"I", b"L", b"o", b"e", b"r", b"d") 34 Channels = (b"I", b"L", b"o", b"e", b"r", b"d")
35 35
36 def __init__(self, repoPath, encoding, parent=None): 36 def __init__(self, repoPath, encoding, vcs, parent=None):
37 """ 37 """
38 Constructor 38 Constructor
39 39
40 @param repoPath root directory of the repository (string) 40 @param repoPath root directory of the repository (string)
41 @param encoding encoding to be used by the command server (string) 41 @param encoding encoding to be used by the command server (string)
42 @param vcs reference to the VCS object (Hg)
42 @param parent reference to the parent object (QObject) 43 @param parent reference to the parent object (QObject)
43 """ 44 """
44 super(HgClient, self).__init__(parent) 45 super(HgClient, self).__init__(parent)
45 46
46 self.__server = None 47 self.__server = None
47 self.__started = False 48 self.__started = False
48 self.__version = None 49 self.__version = None
49 self.__encoding = parent.getEncoding() 50 self.__encoding = vcs.getEncoding()
50 self.__cancel = False 51 self.__cancel = False
51 self.__commandRunning = False 52 self.__commandRunning = False
52 self.__repoPath = repoPath 53 self.__repoPath = repoPath
53 54
54 # generate command line and environment 55 # generate command line and environment
55 self.__serverArgs = parent.initCommand("serve") # parent is hg 56 self.__serverArgs = vcs.initCommand("serve")
56 self.__serverArgs.append("--cmdserver") 57 self.__serverArgs.append("--cmdserver")
57 self.__serverArgs.append("pipe") 58 self.__serverArgs.append("pipe")
58 self.__serverArgs.append("--config") 59 self.__serverArgs.append("--config")
59 self.__serverArgs.append("ui.interactive=True") 60 self.__serverArgs.append("ui.interactive=True")
60 if repoPath: 61 if repoPath:

eric ide

mercurial