@staticmethod
  def decompose_store_path(path):
    '''
    Takes a store path and identifies type, regular file path and details, in
    the form (kind, path, details).
    '''
    def classify(pieces, parents):
      head = pieces[0]
      if head in ["znversion", "scopes"]:
        assert len(pieces) == 1
        return ("meta", parents, head)
      elif head == 'tags':
        assert len(pieces) == 1
        return ("tags", parents, "tags")
      elif head == '_b':
        assert len(pieces) == 3
        return ("commits", parents, pieces[1:])
      elif head == '_c':
        assert len(pieces) == 3
        return ("manifest", parents, pieces[1:])
      elif head == '_f':
        assert len(pieces) == 3
        return ("file", parents + [pieces[-1]], pieces[1:])
      elif head == '_s':
        return classify(pieces[2:], parents + [pieces[1]])
      else:
        raise AssertionError("invalid store path: %s" % pieces)

    (kind, parents, details) = classify(path.strip("/").split("/"), [])

    parents = join_path(*parents)
    if type(details) == list:
      details = join_path(*details)
    return (kind, parents, details)
      

##
## Working directory
##

# Checkout mode for scopes.
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Repo.decompose_store_path/original