-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] Update blame info #3488
[web] Update blame info #3488
Conversation
for f in files: | ||
blame_file = os.path.join(subdir, f) | ||
file_path = blame_file[len(blame_root.rstrip("/")):] | ||
blame_info, remote_url, tracking_branch = \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already getting and storing blame information on this part:
codechecker/web/server/codechecker_server/api/mass_store_run.py
Lines 384 to 385 in 85dd52d
blame_info, remote_url, tracking_branch = get_blame_file_data( | |
blame_file) |
We have to process every git blame info file only once and not multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose not adding blame info when inserting new File
and FileContent
fields because the alternative solution (i.e. returning the list of newly inserted fields) was not convenient. For example gathering the information whether a File
is newly inserted would require to add a second return value for add_file_record()
function and this info should be transferred to __add_blame_info()
through further return values and function parameters.
There is a typo in the commit message: stured -> stored. |
5d27c3b
to
0657558
Compare
When a run is stured with an old CodeChecker version then blame info is empty for the file contents. In a subsequent store we'd like to update blame info for these files.
0657558
to
5b42427
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
When a run is stured with an old CodeChecker version then blame info is
empty for the file contents. In a subsequent store we'd like to update
blame info for these files.