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
Re-implement the stream name to stream number lookups #84
Comments
Currently the process creates a JSON object that maps stream names to stream numbers under the |
This has been partially addressed in commit dfac3f4 When an accurev session is already available we will use Accurev because it is quicker than a first time lookup, however if Accurev is unavailable then we will use purely our Git structures to figure it out. |
Looking up the stream name in the cache should be quicker than asking Accurev. Asking Accurev is quicker than figuring it out for the first time using Git so we should prefer Accurev over the search. This means that the optimal search order should be:
However currently it is:
So these lines should be moved to here to optimize the current pattern. |
That said, we should still refactor the These could then subsequently be aggregated into a single lookup table which would be a simple UTF-8 encoded text file with the following format:
Where the stream numbers and stream names are delimited by a single space or a single tab character. This would make stream name to stream number lookups very fast. |
The need for Let's say you have 6 large streams to convert. Currently you can do the following:
This means that you can distribute the conversion across multiple machines or parallelize it to some extent. This is a feature of the script that would be broken by implementing issue #83, in which case it would be expected that this too is centralized to a single ref. |
The design goals were to have Stage 2 of the script's internal processing not execute any Accurev commands. This is because we should have all the information needed to create the converted Git branches under the
refs/ac2git/depots/
in the Git repository. It was intended that you could re-process the information that was downloaded from Accurev in order to tailor it to your situation or apply bug fixes that were made to the script to your repository.However, the process by which we convert Accurev stream names to Accurev stream numbers from the information under
refs/ac2git/depots/
is slow and error prone, so it should be revised.A fix for this issue has the potential to break backwards compatibility with
refs/ac2git/depots/
that were produced by previous versions of the script forcing those who want to utilize it to re-run the entire conversion once again. A migration path should be considered along-side the fix.The text was updated successfully, but these errors were encountered: