tests/printenv.py
changeset 36254 84a6e39bc723
parent 28944 036787c10b16
child 38111 bacbe829c2bf
equal deleted inserted replaced
36253:fbc29d9f552f 36254:84a6e39bc723
    33     if len(sys.argv) > 3:
    33     if len(sys.argv) > 3:
    34         out = open(sys.argv[3], "ab")
    34         out = open(sys.argv[3], "ab")
    35 
    35 
    36 # variables with empty values may not exist on all platforms, filter
    36 # variables with empty values may not exist on all platforms, filter
    37 # them now for portability sake.
    37 # them now for portability sake.
    38 env = [(k, v) for k, v in os.environ.iteritems()
    38 env = [(k, v) for k, v in os.environ.items()
    39        if k.startswith("HG_") and v]
    39        if k.startswith("HG_") and v]
    40 env.sort()
    40 env.sort()
    41 
    41 
    42 out.write("%s hook: " % name)
    42 out.write("%s hook: " % name)
    43 if os.name == 'nt':
    43 if os.name == 'nt':