src/eric7/Plugins/PluginVcsSubversion.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9482
a2bc06a54d9d
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
10 import contextlib 10 import contextlib
11 import os 11 import os
12 12
13 from PyQt6.QtCore import QCoreApplication, QObject 13 from PyQt6.QtCore import QCoreApplication, QObject
14 14
15 from eric7 import Preferences, Utilities 15 from eric7 import Preferences
16 from eric7.EricWidgets.EricApplication import ericApp 16 from eric7.EricWidgets.EricApplication import ericApp
17 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnUtilities import ( 17 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnUtilities import (
18 getConfigPath, 18 getConfigPath,
19 getServersPath, 19 getServersPath,
20 ) 20 )
21 from eric7.Preferences.Shortcuts import readShortcuts 21 from eric7.Preferences.Shortcuts import readShortcuts
22 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities
22 from eric7.UI import Info 23 from eric7.UI import Info
23 24
24 # Start-Of-Header 25 # Start-Of-Header
25 name = "Subversion Plugin" 26 name = "Subversion Plugin"
26 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 27 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
45 46
46 @return dictionary containing the data to query the presence of 47 @return dictionary containing the data to query the presence of
47 the executable 48 the executable
48 """ 49 """
49 exe = "svn" 50 exe = "svn"
50 if Utilities.isWindowsPlatform(): 51 if OSUtilities.isWindowsPlatform():
51 exe += ".exe" 52 exe += ".exe"
52 53
53 data = { 54 data = {
54 "programEntry": True, 55 "programEntry": True,
55 "header": QCoreApplication.translate( 56 "header": QCoreApplication.translate(
74 (string) and vcs display string (string) 75 (string) and vcs display string (string)
75 """ 76 """
76 global pluginTypename 77 global pluginTypename
77 data = {} 78 data = {}
78 exe = "svn" 79 exe = "svn"
79 if Utilities.isWindowsPlatform(): 80 if OSUtilities.isWindowsPlatform():
80 exe += ".exe" 81 exe += ".exe"
81 if Utilities.isinpath(exe): 82 if FileSystemUtilities.isinpath(exe):
82 data[".svn"] = (pluginTypename, displayString()) 83 data[".svn"] = (pluginTypename, displayString())
83 data["_svn"] = (pluginTypename, displayString()) 84 data["_svn"] = (pluginTypename, displayString())
84 return data 85 return data
85 86
86 87
89 Public function to get the display string. 90 Public function to get the display string.
90 91
91 @return display string (string) 92 @return display string (string)
92 """ 93 """
93 exe = "svn" 94 exe = "svn"
94 if Utilities.isWindowsPlatform(): 95 if OSUtilities.isWindowsPlatform():
95 exe += ".exe" 96 exe += ".exe"
96 if Utilities.isinpath(exe): 97 if FileSystemUtilities.isinpath(exe):
97 return QCoreApplication.translate("VcsSubversionPlugin", "Subversion (svn)") 98 return QCoreApplication.translate("VcsSubversionPlugin", "Subversion (svn)")
98 else: 99 else:
99 return "" 100 return ""
100 101
101 102

eric ide

mercurial