Opened 10 years ago
Last modified 4 years ago
#12406 new enhancement
Standardize nomenclature/options for cached repository
| Reported by: | Ryan J Ollos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7.1 |
| Component: | version control | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Added |
||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
Cached SVN repository is specified using the type svn. Cached Git repository is specified using the option [git] cached_repository. I think the latter is more clear, however it can't be specified per-repository.
In order to be more consistent, we could make cached a repository attribute, and use it for Git and Subversion repositories. We could allow the attribute to be set from the Manage Repositories admin page. An upgrade could be added to migrate users to the new configuration.
Also, the admin panel shows two additional types: direct-svnfs and svnfs. Are these just aliases?
Attachments (0)
Change History (17)
comment:1 by , 8 years ago
| Milestone: | next-major-releases → 1.3.3 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 8 years ago
| Release Notes: | modified (diff) |
|---|
comment:3 by , 8 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 8 years ago
comment:5 by , 8 years ago
Fixed some issues in log:rjollos.git:t12406_cached_repository_nomenclature.3. The messages to resync the cache and modify the repository hooks will only be shown when appropriate. I'll need to add more tests since the changes are rather extensive.
TODO Update TracDev/ApiChanges/1.3 and TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryConnector.
comment:6 by , 8 years ago
It looks like sync_per_request is only valid for a cached repository, so I'll remove the field from the Repository admin page for a repository (such as TracMercurial) that doesn't support cached repository.
Edited 1.3/TracRepositoryAdmin@3.
comment:7 by , 8 years ago
| Release Notes: | modified (diff) |
|---|
comment:8 by , 8 years ago
Looks like we'll need to add a cached option to the [gitweb-repositories] section as well (see also #12480).
I'm reconsidering how the attributes for gitweb repositories should be handled. In order to support the standard repository attributes such as hidden and alias we could have the standard options in a [gitweb] section: projects_base, projects_list and projects_url. The [gitweb-repositories] section would then contain repositories in the format of the [repositories] section, except:
- Only attributes for repositories defined in the
projects_listfile would be used. dirandtypewould be ignored.urlattribute, if specified, would override[gitweb]projects_url.descriptionattribute, if specified, would override the repositorydescriptionfile.
On the last point, we should maybe read the description file for a [repositories] section git repository as well.
TODO Update wiki:1.3/TracRepositoryAdmin#ReposGitWeb.
comment:9 by , 8 years ago
Scope of this ticket is further expanded based on discussion in gmessage:trac-dev:2ityvgVZxsQ/e-yprv0aBAAJ.
- Add
fs_encodingGit repository attribute, to replace[git]git_fs_encoding. We could retaingit_fs_encodingto specify the default (global) repository encoding, perhaps renaming it todefault_fs_encoding. The trade-off is having an extra configuration option and more complexity vs the convenience of not having to specifyfs_encodingfor every repository when encoding is other thanutf-8. Either way the default, when not specified, will remainutf-8.- This change will require adding a way to specify connector-specific attributes. I'm considering adding
get_repository_attributesto theIRepositoryConnectorinterface.
- This change will require adding a way to specify connector-specific attributes. I'm considering adding
- Use the
sync_per_requestattribute as a proxy for[git]persistent_cache, eliminating the latter configuration option. This depends on resolving #12895.
comment:10 by , 8 years ago
| Milestone: | 1.3.3 → 1.3.4 |
|---|
comment:11 by , 7 years ago
| Milestone: | 1.3.4 → 1.5.1 |
|---|
comment:12 by , 6 years ago
| Milestone: | 1.5.1 → 1.5.3 |
|---|
comment:13 by , 5 years ago
| Milestone: | 1.5.3 → 1.7 |
|---|
comment:15 by , 4 years ago
| Milestone: | 1.7.1 |
|---|---|
| Owner: | removed |
| Status: | assigned → new |
comment:16 by , 4 years ago
| Milestone: | → 1.7.1 |
|---|
comment:17 by , 4 years ago
Prior to TracRepositoryAdmin@53, it was incorrectly stated:
Repositories that support caching are cached by default.



Implementation details:
The repository type
svnremains a cached repository becausecacheddefaults toTrue. The repository typegitwas previously non-cached by default since[git]cached_repositorywasFalseby default. Typegitwill now be a cached repository by default.We could make repositories non-cached by default. The implementation is a bit easier that way. However, it seems like a cached repository is what most users would want. I haven't tested the mercurial plugin yet, which doesn't support cached repositories. I'll do some testing, but I think the value of the
cachedattribute will just be ignored. We could add a repository attribute to indicate whether the type supports cached repositories and disable the checkbox on the admin page if the repository type doesn't supportCachedRepository.Let me know if there's a preference for making the default value of
cachedeitherTrueorFalse. In absence of feedback, I'll go withTrue.The changes are entirely not backward compatible, however the upgrade step will prevent breaking an existing environment. Users will need to adapt to the new behavior when creating repositories from the Repositories admin page or using
trac-admin. For example, when creating a repository of typegit, the user will need to explicitly unselect thecachedattribute if they want a non-cached repository.I think it's worth making the change to make the interface more consistent, easier to understand, and add the flexibility to specify per-repository caching for Git repositories. I also think the aliased terms
direct-svnfsandsvnfswere confusing. To mitigate the impact on users, the change will be described in TracUpgrade and the Release Notes.Changes in log:rjollos.git:t12406_cached_repository_nomenclature.