# record the root ALWAYS if provided # if not known and provided
newenv = env.copy()
oldRoot = newenv.get(whiffenv.ROOT)
if root is not None and oldRoot is not None:
root.setParent(oldRoot)
if root is not None:# and newenv.get(whiffenv.ROOT) is None:
#pr "setting root", root
newenv[whiffenv.ROOT] = root

root = self.whiff_root_application
if root is None and env is not None:
root = env.get(whiffenv.ROOT)
while root is not None and root.whiff_root_application is not None and root!=root.whiff_root_application:
# go all the way to the top