Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
experiments: Save git commit history
Browse files Browse the repository at this point in the history
This commit adds a file with the most recent 10 git commits to
the set of files saved for each experiment.
  • Loading branch information
kayousterhout committed Apr 19, 2017
1 parent b29df5a commit be52393
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions experiment_scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ def copy_all_logs(stringified_parameters, slaves):
subprocess.check_call("cp {} {}/".format(configuration_filename,
log_directory_name),
shell=True)

# Save the last 10 git commits for easy reference later.
commit_filename = os.path.join(log_directory_name, "git_commit_history")
spark_directory = get_full_path("spark")
git_commit_command = ("git --git-dir={}/.git --work-tree={} " +
"log -n 10 >> {}").format(spark_directory, spark_directory, commit_filename)
print git_commit_command
subprocess.check_call(git_commit_command, shell=True)
print "Finished copying results to {}".format(log_directory_name)
return log_directory_name

Expand Down

0 comments on commit be52393

Please sign in to comment.