Skip to content
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

Use p4 filelog and p4 annotate first, then get changelist #10

Merged
merged 1 commit into from Jan 21, 2016

Conversation

tyrel
Copy link
Contributor

@tyrel tyrel commented Jan 19, 2016

This optimizes the Perforce annotation process to be both as fast and as complete as possible. It first runs p4 annotate and p4 filelog to get the information. If, for some reason, information is missing from filelog then we'll use p4 change to look it up. In case that also fails, we'll fail gracefully by using the epoch time and "unknown" for the user.

In order to try to optimize the blame process for a file in Perforce,
first run filelog which usually returns all revisions, then run
annotate. If we then encounter a changelist we don't know, attempt to
look it up. If that fails, too, fail gracefully.
@henryju
Copy link
Contributor

henryju commented Jan 21, 2016

I have no way to test but LGTM.

henryju added a commit that referenced this pull request Jan 21, 2016
SONARSCPER-15 Use p4 filelog and p4 annotate first, then get changelist
@henryju henryju merged commit 6813e6e into perforce:master Jan 21, 2016
@henryju
Copy link
Contributor

henryju commented Jan 21, 2016

@mjdetullio Can you confirm this change works fine also for you? If everything is ok I'll release a 1.3.1. I guess we'll have to wait for a while before being able to use the -u option.

@mjdetullio
Copy link
Contributor

Yes, please give me an opportunity to test. I hope to have some time this week. It looks OK at first sight.

@mjdetullio
Copy link
Contributor

Took me forever to get to it but it seems like it's working fine on one 300k LOC project and one 1.5M LOC project so I deployed to production

@tyrel
Copy link
Contributor Author

tyrel commented Feb 17, 2016

Good to hear!

By the way, my company is going to be moving from Perforce to Git over the next 12 months, so I probably won't be able to provide much more assistance here for much longer, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants