Show More
@@ -32,13 +32,15 b' if len(sys.argv) > 2:' | |||||
32 |
|
32 | |||
33 | # variables with empty values may not exist on all platforms, filter |
|
33 | # variables with empty values may not exist on all platforms, filter | |
34 | # them now for portability sake. |
|
34 | # them now for portability sake. | |
35 | env = [k for k, v in os.environ.iteritems() |
|
35 | env = [(k, v) for k, v in os.environ.iteritems() | |
36 | if k.startswith("HG_") and v] |
|
36 | if k.startswith("HG_") and v] | |
37 | env.sort() |
|
37 | env.sort() | |
38 |
|
38 | |||
39 | out.write("%s hook: " % name) |
|
39 | out.write("%s hook: " % name) | |
40 | for v in env: |
|
40 | for k, v in env: | |
41 | out.write("%s=%s " % (v, os.environ[v])) |
|
41 | if os.name == 'nt': | |
|
42 | v = v.replace('\\', '/') | |||
|
43 | out.write("%s=%s " % (k, v)) | |||
42 | out.write("\n") |
|
44 | out.write("\n") | |
43 | out.close() |
|
45 | out.close() | |
44 |
|
46 |
General Comments 0
You need to be logged in to leave comments.
Login now