parameters: (dirpath)
docstring: After an amend/rebase, Eden may need to fetch a large number
      of trees from the servers.  The simplistic single threaded walk
      performed by copytree makes this more expensive than is desirable
      so we help accelerate things by performing a prefetch on the
      source directory
docstring_summary: After an amend/rebase, Eden may need to fetch a large number
      of trees from the servers.  The simplistic single threaded walk
      performed by copytree makes this more expensive than is desirable
      so we help accelerate things by performing a prefetch on the
      source directory
docstring_tokens: After an amend / rebase Eden may need to fetch a large number of trees from the servers . The simplistic single threaded walk performed by copytree makes this more expensive than is desirable so we help accelerate things by performing a prefetch on the source directory
function: def prefetch_dir_if_eden(dirpath):
      """After an amend/rebase, Eden may need to fetch a large number
      of trees from the servers.  The simplistic single threaded walk
      performed by copytree makes this more expensive than is desirable
      so we help accelerate things by performing a prefetch on the
      source directory"""
      global PREFETCHED_DIRS
      if dirpath in PREFETCHED_DIRS:
          return
      root = find_eden_root(dirpath)
      if root is None:
          return
      glob = f"{os.path.relpath(dirpath, root).replace(os.sep, '/')}/**"
      print(f"Prefetching {glob}")
      subprocess.call(
          ["edenfsctl", "prefetch", "--repo", root, "--silent", glob, "--background"]
      )
      PREFETCHED_DIRS.add(dirpath)
function_tokens: def prefetch_dir_if_eden ( dirpath ) : global PREFETCHED_DIRS if dirpath in PREFETCHED_DIRS : return root = find_eden_root ( dirpath ) if root is None : return glob = f"{os.path.relpath(dirpath, root).replace(os.sep, '/')}/**" print ( f"Prefetching {glob}" ) subprocess . call ( [ "edenfsctl" , "prefetch" , "--repo" , root , "--silent" , glob , "--background" ] ) PREFETCHED_DIRS . add ( dirpath )