-
-
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
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 … |
david |
- Change Summary:
-
build an ordered list of ClearCase repositories starting with the one matching vobstag
- Description:
-
~ check clearcase vobstag and uuid first, and fallback with uuid only to reduce HTTP queries about each rvb repository
~ 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 repository + + found a side issue if no vobstag is matching:
+ 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 :-( - Testing Done:
-
~ posting reviews against clearcase vob still works
~ posting reviews against clearcase repo with matching vobstag still works
- Diff:
-
Revision 2 (+22 -6)
- Change Summary:
-
catch exception when browsing restricted repository
- Description:
-
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 repository ~ found a side issue if no vobstag is matching:
~ found 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 :-( - Testing Done:
-
~ posting reviews against clearcase repo with matching vobstag still works
~ 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 - Diff:
-
Revision 3 (+41 -6)