Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#4797 closed enhancement (fixed)

resync should be able to resync a single changeset

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone: 0.10.4
Component: version control Version:
Severity: normal Keywords: resync
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (0)

Change History (7)

comment:1 by Sergei Haller <sergei@…>, 18 years ago

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 by Christian Boos, 18 years ago

Component: generalversion control
Keywords: resync added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

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 by anonymous, 18 years ago

You are all too cool! Thanks for following up on this :)

comment:4 by Christian Boos, 18 years ago

Milestone: 0.110.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 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

(forgot to close it, see above)

comment:6 by Ryan Ollos <ryano@…>, 15 years ago

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.

in reply to:  6 comment:7 by Ryan Ollos <ryano@…>, 15 years ago

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.