- ui = pages.UIs[name]
- return list("css/%s%s.css" % ("debug/" if gen else "", x) for x in pages.flatten([ui.get("extracss", []), "colours", "dialogs", "%s" % name]))
+ css = pages.flatten([ui.get("extracss", []), "colours", "dialogs"])
+ if not nocss:
+ css = list(css) + [name]
+ return list("css/%s%s.css" % ("debug/" if gen else "", x) for x in css)
+
+def _gethgid():
+ try:
+ p = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE, shell=os.name == "nt")
+ except Exception, e:
+ if hasattr(e, "errno") and e.errno == 2:
+ raise HGException, "unable to execute"
+ raise HGException, "unknown exception running hg: %s" % repr(e)
+
+ data = p.communicate()[0]
+ if p.wait() != 0:
+ raise HGException, "unable to get id"
+ return re.match("^([0-9a-f]+).*", data).group(1)