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