def get_files_changed(repository, review_id):
    """
    Get a list of files changed compared to the given review.
    Compares against current directory.

    :param repository: Git repository. Used to get remote.
      - By default uses first remote in list.
    :param review_id: Gerrit review ID.
    :return: List of file paths relative to current directory.
    """
    repository.git.fetch([next(iter(repository.remotes)), review_id])
    files_changed = repository.git.diff_tree(["--no-commit-id",
                                              "--name-only",
                                              "-r",
                                              "FETCH_HEAD"]).splitlines()
    print("Found {} files changed".format(len(files_changed)))
    return files_changed
def get_files_changed ( repository , review_id ) : repository . git . fetch ( [ next ( iter ( repository . remotes ) ) , review_id ] ) files_changed = repository . git . diff_tree ( [ "--no-commit-id" , "--name-only" , "-r" , "FETCH_HEAD" ] ) . splitlines ( ) print ( "Found {} files changed" . format ( len ( files_changed ) ) ) return files_changed
Get a list of files changed compared to the given review.
    Compares against current directory.

    :param repository: Git repository. Used to get remote.
      - By default uses first remote in list.
    :param review_id: Gerrit review ID.
    :return: List of file paths relative to current directory.