Edgewall Software

Opened 19 years ago

Closed 15 years ago

Last modified 7 years ago

#2482 closed enhancement (duplicate)

document usage of post-revprop-change script

Reported by: cmarschalek Owned by: Christian Boos
Priority: normal Milestone:
Component: version control Version: 0.9.2
Severity: normal Keywords: multirepos documentation
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Trac doesn't display changed log messages even after a server restart. I changed it via "svnadmin setlog -r xx <file> —bypass-hooks". Some sort of caching problem?

Attachments (0)

Change History (10)

comment:1 by Matthew Good, 19 years ago

Resolution: worksforme
Status: newclosed

you need to use the trac-admin command "resync"

comment:2 by Christian Boos, 19 years ago

Component: timelineversion control
Resolution: worksforme
Status: closedreopened

Exactly, that's a caching issue. Let me elaborate on the resync issue.

There are even two levels of caching involved:

  • a Trac environment caches the repository commit message logs in a SQL table. This is done incrementally. If you changed a log message by using svnadmin setlog, you also need to issue a TracAdmin resync command, to rebuild the cache. See also #2382 and #1271.
  • then, a rendered changeset web page might be cached by the browser. So even if you did a resync, you might still see the old content. You should then force the reload by your web browser (this is "fixed" in the development version, since r2636)

This should be done in a post-revprop-change hook which would access the Trac DB, eventually version the previous changeset message (see #781), and write the new changeset message.

If such a script is in place, you should also avoid using --bypass-hooks, of course :)

comment:3 by Christian Boos, 19 years ago

Milestone: 1.0
Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew
Type: defectenhancement

I'll try to write such a post-revprop-change hook.

comment:4 by Christopher Lenz, 19 years ago

What's so hard about putting a trac-admin /path/to/projenv resync into an existing post-revprop-change script? Do we need to provide a script for this?

comment:5 by cmarschalek, 19 years ago

Thanks for the info guys, here's what I think you could do:

Add a function which checks the cached log text when you view a changeset specifical This way the timeline would still be fast but there would still be a way the log message could get updated without the user knowing that he has to do a resync. Just a thought ;)

comment:6 by Christian Boos, 19 years ago

The resync should be targeted to one revision only. So the script should contain trac-admin /path/to/projenv resync $REV (therefore the connection with #1271).

Also, I was thinking about #781, where a versioning of the changeset log message could be done.

However, in the script this could be done using e.g. trac-admin /path/to/projenv resync $REV --backup, so, yes, no special script should be needed.

comment:7 by osimons, 16 years ago

This ticket is > 2 years since last update. Is this still relevant as a Trac issue?

comment:8 by Christian Boos, 16 years ago

Keywords: svn documentation added; not displayed removed

It's more a documentation issue. There's no write up yet summarizing all the useful ways Trac and Subversion can be integrated. For one, the trick of putting a

trac-admin /path/to/projenv resync $REV

in a post-revprop-change hook is not yet documented anywhere, AFAIK.

comment:9 by Christian Boos, 15 years ago

Keywords: multirepos added; svn log changes removed
Milestone: 1.00.12
Summary: Log changes aren't displayeddocument usage of post-revprop-change script

Note that this resync <repos> <rev> will be repository notify changeset_modified <repos> <rev> with MultiRepos.

The documentation for the various hooks should be rewritten anyway for MultiRepos, let's keep this ticket as a reminder.

comment:10 by Christian Boos, 15 years ago

Milestone: 0.12
Resolution: duplicate
Status: newclosed

See #6016.

Modify Ticket

Change Properties
Set your email in Preferences
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.