24 userprofile = os.environ["USERPROFILE"] |
26 userprofile = os.environ["USERPROFILE"] |
25 return os.path.join(userprofile, "Mercurial.ini") |
27 return os.path.join(userprofile, "Mercurial.ini") |
26 else: |
28 else: |
27 homedir = Utilities.getHomeDir() |
29 homedir = Utilities.getHomeDir() |
28 return os.path.join(homedir, ".hgrc") |
30 return os.path.join(homedir, ".hgrc") |
|
31 |
|
32 |
|
33 def prepareProcess(proc, encoding="", language=""): |
|
34 """ |
|
35 Public method to prepare the given process. |
|
36 |
|
37 @param proc reference to the proces to be prepared (QProcess) |
|
38 @param encoding encoding to be used by the process (string) |
|
39 @param language language to be set (string) |
|
40 """ |
|
41 env = QProcessEnvironment.systemEnvironment() |
|
42 env.insert("HGPLAIN", '1') |
|
43 |
|
44 # set the encoding for the process |
|
45 if encoding: |
|
46 env.insert("HGENCODING", encoding) |
|
47 |
|
48 # set the language for the process |
|
49 if language: |
|
50 env.insert("LANGUAGE", language) |
|
51 |
|
52 proc.setProcessEnvironment(env) |