Edgewall Software
Modify

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@…>

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)

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

Fixed in r5140 (trunk) and r5141 (0.10-stable).

I ported it to stable as the full resync is now even more costly in 0.10.4, due to the commit after each sync done for robustness reasons.

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: 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
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.