mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
some debugging
This commit is contained in:
parent
1d443f6cc8
commit
35e4be5cd9
@ -65,7 +65,7 @@ def main():
|
||||
help='The commit for current release.')
|
||||
parser.add_argument('-nc', '--no-commits', dest='no_commits', action='store_true', default=False,
|
||||
required=False, help="Suppresses adding commits to the generated csv header.")
|
||||
parser.add_argument('-l', '--language', dest='language', type=str, default='HEAD', required=False,
|
||||
parser.add_argument('-l', '--language', dest='language', type=str, default=None, required=False,
|
||||
help='Specify the language in order to determine the first commit to use (i.e. \'ja\' for '
|
||||
'Japanese. This flag overrides the first-commit flag.')
|
||||
parser.add_argument('-vr', '--value-regex', dest='value_regex', type=str, default=None, required=False,
|
||||
@ -81,8 +81,9 @@ def main():
|
||||
output_path = args.output_path
|
||||
commit_1_id = args.commit_1_id
|
||||
value_regex = args.value_regex
|
||||
if args.language is not None:
|
||||
commit_1_id = get_commit_for_language(args.language)
|
||||
lang = args.language
|
||||
if lang is not None:
|
||||
commit_1_id = get_commit_for_language(lang)
|
||||
|
||||
if commit_1_id is None:
|
||||
print('Either the first commit or language flag need to be specified. If specified, the language file, ' +
|
||||
|
@ -100,7 +100,7 @@ def get_commit_id(repo_path: str, commit_id: str) -> str:
|
||||
The hash for the commit in the repo.
|
||||
"""
|
||||
repo = Repo(repo_path, search_parent_directories=True)
|
||||
commit = repo.commit(commit_id)
|
||||
commit = repo.commit(commit_id.strip())
|
||||
return str(commit.hexsha)
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ def get_property_files_diff(repo_path: str, commit_1_id: str, commit_2_id: str,
|
||||
All found item changes in values of keys between the property files.
|
||||
"""
|
||||
|
||||
diffs = get_diff(repo_path, commit_1_id, commit_2_id)
|
||||
diffs = get_diff(repo_path, commit_1_id.strip(), commit_2_id.strip())
|
||||
for diff in diffs:
|
||||
rel_path = get_rel_path(diff)
|
||||
if rel_path is None or not rel_path.endswith('.' + property_file_extension):
|
||||
@ -160,7 +160,7 @@ def get_property_file_entries(repo_path: str, at_commit: str = 'HEAD',
|
||||
|
||||
"""
|
||||
repo = Repo(repo_path, search_parent_directories=True)
|
||||
commit = repo.commit(at_commit)
|
||||
commit = repo.commit(at_commit.strip())
|
||||
for item in list_paths(commit.tree):
|
||||
path, blob = item
|
||||
if path.endswith(property_file_extension):
|
||||
|
@ -0,0 +1 @@
|
||||
# in format of bundles.<language>.lastupdated=<commit id>
|
Loading…
x
Reference in New Issue
Block a user