Ticket #4797 (closed enhancement: fixed)
Opened 5 years ago
Last modified 2 years ago
resync should be able to resync a single changeset
| Reported by: | anonymous | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10.4 |
| Component: | version control | Version: | |
| Severity: | normal | Keywords: | resync |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
Trac takes a long time to resync to our SVN repository. It would be nice if we could just resync the relevant revision, after a propchange for example. We could then call trac-admin resync revisionNumber (or something like that) automatically whenever a property was changed. Would this be a possible enhancement?
Attachments
Change History
comment:1 Changed 5 years ago by Sergei Haller <sergei@…>
comment:2 Changed 5 years ago by cboos
- Component changed from general to version control
- Keywords resync added
- Milestone set to 0.11
- Owner changed from jonas to cboos
The request is about the possibility to resync "after a (revision) property was changed". A common use case for this is to resync the Trac cache after editing a commit log message (the svn:log property), usually done using svnadmin setlog, as we still don't have #781 implemented...
There's already a similar ticket for resyncing a range of changesets (#1271), but the original patch for that was somewhat too complex to be implemented in due time, so I think this simpler request (trac-admin $TRAC_ENV resync <number>) is worthwhile and can be implemented for 0.11.
comment:3 Changed 5 years ago by anonymous
You are all too cool! Thanks for following up on this :)
comment:4 Changed 5 years ago by cboos
- Milestone changed from 0.11 to 0.10.4
comment:5 Changed 5 years ago by cboos
- Resolution set to fixed
- Status changed from new to closed
(forgot to close it, see above)
comment:6 follow-up: ↓ 7 Changed 2 years ago by Ryan Ollos <ryano@…>
I had to do some research to figure out how to do this (see also #643), so I added an FAQ with the relevant information: TracFaq#how-to-update-tracrevlog-after-revprop-edit.
I haven't tried this yet, but from the reporter's comment it seems like it would be possible to run the command from Subversion's post-revprop-change hook.
comment:7 in reply to: ↑ 6 Changed 2 years ago by Ryan Ollos <ryano@…>
Replying to Ryan Ollos <ryano@…>:
I haven't tried this yet, but from the reporter's comment it seems like it would be possible to run the command from Subversion's post-revprop-change hook.
Setup a simple post-revprop-change hook for svn that resyncs Trac's changelog after an revprop change. Seems to work well.
TRACENV="/var/lib/trac/psi" REPOS="$1" REV="$2" USER="$3" PROPNAME="$4" ACTION="$5" trac-admin $TRACENV resync $REV



you don't need to resync after each change in the svn repository.
trac will do that automatically. "trac-admin resync" is there for a _complete_ resync.
(e.g. if you move the repository to another path, you change the path in trac.ini and do a resync)