Meta Info Utils¶
delete_fake_files()
¶
Recursively searches for and handles files with a specific version substring within the target repository. Empty files are deleted, while non-empty ones are renamed to their original filenames, effectively restoring previous versions. Informative messages are printed detailing each file action.
This method recursively searches for files ending with a specific substring
(defined by latest_verison_substring
) within the target repository directory.
If a corresponding original file exists, it's deleted. Empty fake files are removed,
and non-empty ones are renamed to their original names. Prints messages indicating
deleted or recovered files.
Returns:
Type | Description |
---|---|
None |
Source code in repo_agent/utils/meta_info_utils.py
make_fake_files()
¶
Generates temporary copies of modified or deleted Python files and identifies untracked Python files, providing a mapping between original and latest version paths.
This method first deletes any existing fake files, then identifies untracked .py files and unstaged additions/modifications/deletions. It renames or creates temporary versions of modified/deleted files with a version suffix, effectively creating "fake" copies for documentation purposes. It also skips untracked Python files.
Returns:
Name | Type | Description |
---|---|---|
tuple |
A tuple containing a dictionary mapping original file paths to their corresponding latest version paths and a list of skipped untracked .py files. |