Description[pinpoint] Add a mapping from repository URLs to repository names.
webrtc just changed repository locations, which means that we have two URLs for
the same repository, the old one and the new one.
If we have an additional mapping from URLs to names, we can have two URL entries
that both map to the same short name. So internally, they will both be known as
'webrtc'. Then when looking up the URL later in the name -> URL mapping, it will
always be the new URL. Essentially, any old URLs get upconverted automatically.
I've chosen to have a separate key with a new name and different structure,
because I want to stress that the original 'repositories' key has the "canonical
repository information" mapping. In case we add other repository information
besides the URL, that's the key to add it to.
If a bisect run finds a DEPS file with an unknown repository URL, it will still
add it automatically to both mappings, similar to before. But if it will have
the same name as another entry, I've chosen to make it fail instead of updating
it. This is to avoid situations where we overwrite a repository name that we
shouldn't. E.g. `src` maps to `breakpad/src`. If someone adds a dep
`other_repo/src`, and we don't want to accidentally overwrite the `src` mapping
to point to `other_repo/src`. We should update the mapping manually in cases
like this.
BUG=catapult:#3861
Review-Url: https://chromiumcodereview.appspot.com/3013683002
Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/bbb2b1f8de98ba6bb904e9f68a08d242d521ec04
Patch Set 1 #Patch Set 2 : Unit tests. #
Total comments: 4
Patch Set 3 : /api/gitiles #
Total comments: 1
Messages
Total messages: 11 (4 generated)
|