Opened 9 years ago
Last modified 3 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 , 7 years ago
Description: | modified (diff) |
---|
comment:4 by , 7 years ago
comment:5 by , 7 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 , 7 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 , 7 years ago
Release Notes: | modified (diff) |
---|
comment:8 by , 7 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_list
file would be used. dir
andtype
would be ignored.url
attribute, if specified, would override[gitweb]
projects_url
.description
attribute, if specified, would override the repositorydescription
file.
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 , 7 years ago
Scope of this ticket is further expanded based on discussion in gmessage:trac-dev:2ityvgVZxsQ/e-yprv0aBAAJ.
- Add
fs_encoding
Git repository attribute, to replace[git]
git_fs_encoding
. We could retaingit_fs_encoding
to 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_encoding
for 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_attributes
to theIRepositoryConnector
interface.
- This change will require adding a way to specify connector-specific attributes. I'm considering adding
- Use the
sync_per_request
attribute as a proxy for[git]
persistent_cache
, eliminating the latter configuration option. This depends on resolving #12895.
comment:10 by , 7 years ago
Milestone: | 1.3.3 → 1.3.4 |
---|
comment:11 by , 6 years ago
Milestone: | 1.3.4 → 1.5.1 |
---|
comment:12 by , 5 years ago
Milestone: | 1.5.1 → 1.5.3 |
---|
comment:13 by , 4 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 , 3 years ago
Prior to TracRepositoryAdmin@53, it was incorrectly stated:
Repositories that support caching are cached by default.
Implementation details:
The repository type
svn
remains a cached repository becausecached
defaults toTrue
. The repository typegit
was previously non-cached by default since[git]
cached_repository
wasFalse
by default. Typegit
will 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
cached
attribute 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
cached
eitherTrue
orFalse
. 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 thecached
attribute 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-svnfs
andsvnfs
were 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.