Ticket #2733 (new enhancement)
Opened 6 years ago
Last modified 2 years ago
Push some more behaviour to the vc backend
| Reported by: | Lele Gaifax | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | next-major-0.1X |
| Component: | version control | Version: | 0.9.3 |
| Severity: | normal | Keywords: | cache |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
In order to get my new TracDarcs plugin working, I had to apply this patch that
- Fixes #2731
- Adds an "hash" field to the revision table
- Moves the actual insertion of the cache data from the CachedRepository class to the Changeset one
Point 3 allows the backend to augment the cached data as needed, simply by overriding a Changeset method (see for example).
Of course, I could have reimplemented the whole sync() machinery in a subclass of CachedRepository, but DRY approach suggests that's not the right way.
Attachments
Change History
comment:1 Changed 6 years ago by mgood
comment:2 Changed 5 years ago by cboos
- Milestone set to 0.12
- Owner changed from cmlenz to cboos
See VcRefactoring
comment:3 Changed 3 years ago by cboos
- Keywords cache added
- Milestone changed from 0.13 to 0.12
comment:4 Changed 3 years ago by cboos
See TracDarcs/Cache
comment:5 Changed 2 years ago by rblank
The patch is unfortunately not available anymore, so I have trouble deciding if this should still be done (possibly on multirepos). Lele, any chance of getting a current patch?
comment:6 Changed 2 years ago by cboos
- Milestone changed from 0.12 to next-major-0.1X



It would help if you explained the purpose of the "hash" column since it's not actually used in the patch anywhere.
What changes are necessary in the cache? The classes in trac.versioncontrol.api are meant to be decoupled from the cache, so if it's necessary to extend the cache, this should be done in the cache module, not api.