Update the URL hash parsing code to handle line codes
What does this MR do and why?
For #425850 (closed)
Upgrades the URL parsing mechanism to use a better string parser that identifies file hashes (SHA1 hashes) more reliably.
This continues working as before, but also adds support for line codes.
Screenshots or screen recordings
| Before | After |
|---|---|
| RecApp-2023-09-20-15_37_07 | RecApp-2023-09-20-15_40_13 |
How to set up and validate locally
- Create an MR with enough files that some will be automatically truncated / collapsed
- I find that an MR with 100 files, each with 250 lines (and the first file has >6000 lines of changes) is enough to experience all the different kinds of automatic collapsing
- Get a line code to a file that is automatically collapsed.
- An easy way to do this is scroll until you get to files that are automatically collapsed, click
Expand file, and then copy the URL from one of the linkable line numbers.
- An easy way to do this is scroll until you get to files that are automatically collapsed, click
- Switch the MR to
View one file at a time(single-file/file-by-file) - Load your link to a line in a new tab
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.