comparison tests/printenv.py @ 7787:b8d750daadde

Introduce HG_PREPEND to solve pretxn races - add writepending to flush delayed writes to separate file - add support in hooks for lazy evaluation of callable parameters - add HG_PENDING to pretxn hooks - call writepending if hook is used - pass repo root to hook environment - if HG_PENDING = repo root, we're in pretxn hook - read pending data to make pending changesets visible - filter HG_PENDING in tests/printenv.py
author Matt Mackall <mpm@selenic.com>
date Mon, 16 Feb 2009 19:35:07 -0600
parents f77c8d8331ca
children f60f6f41978e
comparison
equal deleted inserted replaced
7786:92455c1d6f83 7787:b8d750daadde
44 if url.startswith("file:"): 44 if url.startswith("file:"):
45 os.environ["HG_URL"] = "file:" 45 os.environ["HG_URL"] = "file:"
46 elif url.startswith("remote:http"): 46 elif url.startswith("remote:http"):
47 os.environ["HG_URL"] = "remote:http" 47 os.environ["HG_URL"] = "remote:http"
48 48
49 if "HG_PENDING" in os.environ:
50 os.environ["HG_PENDING"] = os.environ["HG_PENDING"] and "true"
51
49 out.write("%s hook: " % name) 52 out.write("%s hook: " % name)
50 for v in env: 53 for v in env:
51 out.write("%s=%s " % (v, os.environ[v])) 54 out.write("%s=%s " % (v, os.environ[v]))
52 out.write("\n") 55 out.write("\n")
53 out.close() 56 out.close()