File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,21 @@ def store_code_state(logdir, repositories) -> list:
6565 for repository_file_path in repositories :
6666 try :
6767 repo = git .Repo (repository_file_path , search_parent_directories = True )
68- except git .InvalidGitRepositoryError :
68+ except Exception :
69+ print (f"Could not find git repository in { repository_file_path } . Skipping." )
6970 # skip if not a git repository
7071 continue
7172 # get the name of the repository
7273 repo_name = pathlib .Path (repo .working_dir ).name
7374 t = repo .head .commit .tree
7475 diff_file_name = os .path .join (git_log_dir , f"{ repo_name } .diff" )
75- content = f"--- git status ---\n { repo .git .status ()} \n \n \n --- git diff ---\n { repo .git .diff (t )} "
76+ # check if the diff file already exists
77+ if os .path .isfile (diff_file_name ):
78+ continue
79+ # write the diff file
80+ print (f"Storing git diff for '{ repo_name } ' in: { diff_file_name } " )
7681 with open (diff_file_name , "x" ) as f :
82+ content = f"--- git status ---\n { repo .git .status ()} \n \n \n --- git diff ---\n { repo .git .diff (t )} "
7783 f .write (content )
7884 # add the file path to the list of files to be uploaded
7985 file_paths .append (diff_file_name )
Original file line number Diff line number Diff line change 55
66setup (
77 name = "rsl_rl" ,
8- version = "2.0.1 " ,
8+ version = "2.0.2 " ,
99 packages = find_packages (),
1010 author = "ETH Zurich, NVIDIA CORPORATION" ,
1111 maintainer = "Nikita Rudin, David Hoeller" ,
You can’t perform that action at this time.
0 commit comments