-
-
rbtools/clients/clearcase.py (Diff revision 1) This is pretty confusing. How about we build an ordered list of repositories, putting the ones that match the vobstag first? Something like this:
# Start by scanning all repositories where the vobstag # matches. repository_scan_order = [ repo for repo in repositories if (repository['tool'] == 'ClearCase' and repository['name'] == self.vobstag) ] # Now add all ClearCase repositories repository_scan_order.extend([ repo for repo in repositories if (repository['tool'] == 'ClearCase' and repository not in repository_scan_order) ]) for repository in repository_scan_order: info = self._get_repository_info(server, repository) if not info or uuid != info['uuid']: continue path = info['repopath'] logging.debug('Matching repository uuid %s with path %s', uuid, path) return ClearCaseRepositoryInfo(path, path, uuid)
Note that I haven't tested this.
check clearcase vobtag before checking vob uuid to save much time on server with several clearcase repositories
Review Request #5166 — Created Dec. 26, 2013 and submitted
Information | |
---|---|
delyn | |
RBTools | |
master | |
3177 | |
Reviewers | |
rbtools | |
jan.koprowski |
build an ordered list of ClearCase repositories starting with the one matching vobstag
so check clearcase with matching vobstag first then fallback with uuid only to reduce HTTP queries about each rvb repositoryfound and caught a side issue when there are restricted repositories:
it will try to get info of all clearcase repo until one vobstag uuid matches
it gets a 403 error as soon as it tries getting info of a private and unaccessible for current user :-(
posting reviews against authorized clearcase repo with matching vobstag still works
posting reviews against authorized clearcase repo with no matching vobstag will work whereas there are some unauthorized clearcase repo in the list
posting reviews against unauthorized clearcase repo returns an error
Description | From | Last Updated |
---|---|---|
This is pretty confusing. How about we build an ordered list of repositories, putting the ones that match the vobstag … |
|
Change Summary:
build an ordered list of ClearCase repositories starting with the one matching vobstag
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||
Diff: |
Revision 2 (+22 -6) |
Change Summary:
catch exception when browsing restricted repository
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||
Diff: |
Revision 3 (+41 -6) |