47 Public method to support the display of some executable info. |
47 Public method to support the display of some executable info. |
48 |
48 |
49 @return dictionary containing the data to query the presence of |
49 @return dictionary containing the data to query the presence of |
50 the executable |
50 the executable |
51 """ |
51 """ |
52 exe = 'hg' |
|
53 if Utilities.isWindowsPlatform(): |
|
54 exe += '.exe' |
|
55 |
|
56 data = { |
52 data = { |
57 "programEntry": True, |
53 "programEntry": True, |
58 "header": QCoreApplication.translate( |
54 "header": QCoreApplication.translate( |
59 "VcsMercurialPlugin", "Version Control - Mercurial"), |
55 "VcsMercurialPlugin", "Version Control - Mercurial"), |
60 "exe": exe, |
56 "exe": getHgExecutable(), |
61 "versionCommand": 'version', |
57 "versionCommand": 'version', |
62 "versionStartsWith": 'Mercurial', |
58 "versionStartsWith": 'Mercurial', |
63 "versionPosition": -1, |
59 "versionPosition": -1, |
64 "version": "", |
60 "version": "", |
65 "versionCleanup": (0, -1), |
61 "versionCleanup": (0, -1), |
75 @return dictionary with indicator as key and a tuple with the vcs name |
71 @return dictionary with indicator as key and a tuple with the vcs name |
76 (string) and vcs display string (string) |
72 (string) and vcs display string (string) |
77 """ |
73 """ |
78 global pluginTypename |
74 global pluginTypename |
79 data = {} |
75 data = {} |
80 exe = 'hg' |
76 exe = getHgExecutable() |
81 if Utilities.isWindowsPlatform(): |
|
82 exe += '.exe' |
|
83 if Utilities.isinpath(exe): |
77 if Utilities.isinpath(exe): |
84 data[".hg"] = (pluginTypename, displayString()) |
78 data[".hg"] = (pluginTypename, displayString()) |
85 data["_hg"] = (pluginTypename, displayString()) |
79 data["_hg"] = (pluginTypename, displayString()) |
86 return data |
80 return data |
87 |
81 |
90 """ |
84 """ |
91 Public function to get the display string. |
85 Public function to get the display string. |
92 |
86 |
93 @return display string (string) |
87 @return display string (string) |
94 """ |
88 """ |
95 exe = 'hg' |
89 exe = getHgExecutable() |
96 if Utilities.isWindowsPlatform(): |
|
97 exe += '.exe' |
|
98 if Utilities.isinpath(exe): |
90 if Utilities.isinpath(exe): |
99 return QCoreApplication.translate('VcsMercurialPlugin', 'Mercurial') |
91 return QCoreApplication.translate('VcsMercurialPlugin', 'Mercurial') |
100 else: |
92 else: |
101 return "" |
93 return "" |
102 |
94 |