10 import contextlib |
10 import contextlib |
11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtCore import QDateTime, Qt |
13 from PyQt6.QtCore import QDateTime, Qt |
14 |
14 |
15 from eric7 import Utilities |
15 from eric7.SystemUtilities import OSUtilities |
16 |
16 |
17 from .Config import DefaultConfig, DefaultIgnores |
17 from .Config import DefaultConfig, DefaultIgnores |
18 |
18 |
19 |
19 |
20 def formatTime(seconds): |
20 def formatTime(seconds): |
49 """ |
49 """ |
50 Module function to get the filename of the servers file. |
50 Module function to get the filename of the servers file. |
51 |
51 |
52 @return filename of the servers file (string) |
52 @return filename of the servers file (string) |
53 """ |
53 """ |
54 if Utilities.isWindowsPlatform(): |
54 if OSUtilities.isWindowsPlatform(): |
55 appdata = os.environ["APPDATA"] |
55 appdata = os.environ["APPDATA"] |
56 return os.path.join(appdata, "Subversion", "servers") |
56 return os.path.join(appdata, "Subversion", "servers") |
57 else: |
57 else: |
58 homedir = Utilities.getHomeDir() |
58 homedir = OSUtilities.getHomeDir() |
59 return os.path.join(homedir, ".subversion", "servers") |
59 return os.path.join(homedir, ".subversion", "servers") |
60 |
60 |
61 |
61 |
62 def getConfigPath(): |
62 def getConfigPath(): |
63 """ |
63 """ |
64 Module function to get the filename of the config file. |
64 Module function to get the filename of the config file. |
65 |
65 |
66 @return filename of the config file (string) |
66 @return filename of the config file (string) |
67 """ |
67 """ |
68 if Utilities.isWindowsPlatform(): |
68 if OSUtilities.isWindowsPlatform(): |
69 appdata = os.environ["APPDATA"] |
69 appdata = os.environ["APPDATA"] |
70 return os.path.join(appdata, "Subversion", "config") |
70 return os.path.join(appdata, "Subversion", "config") |
71 else: |
71 else: |
72 homedir = Utilities.getHomeDir() |
72 homedir = OSUtilities.getHomeDir() |
73 return os.path.join(homedir, ".subversion", "config") |
73 return os.path.join(homedir, ".subversion", "config") |
74 |
74 |
75 |
75 |
76 def createDefaultConfig(): |
76 def createDefaultConfig(): |
77 """ |
77 """ |