code: def get_vcs_root(path):
      
      previous_path = path
      while get_vcs_info(path) is None:
          path = abspardir(path)
          if path == previous_path:
              return
          else:
              previous_path = path
      return osp.abspath(path)
docs: Return VCS root directory path
      Return None if path is not within a supported VCS repository