Edgewall Software

Ticket #2482 (new enhancement)

Opened 3 years ago

Last modified 10 months ago

Log changes aren't displayed

Reported by: cmarschalek Owned by: cboos
Priority: normal Milestone: 1.0
Component: version control Version: 0.9.2
Severity: normal Keywords: svn log changes documentation
Cc:

Description

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

Change History

Changed 3 years ago by mgood

  • status changed from new to closed
  • resolution set to worksforme

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

Changed 3 years ago by cboos

  • status changed from closed to reopened
  • resolution worksforme deleted
  • component changed from timeline to version control

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

Changed 3 years ago by cboos

  • owner changed from jonas to cboos
  • status changed from reopened to new
  • type changed from defect to enhancement
  • milestone set to 1.0

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

Changed 3 years ago by cmlenz

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?

Changed 3 years ago by cmarschalek

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 ;)

Changed 3 years ago by cboos

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.

Changed 10 months ago by osimons

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

Changed 10 months ago by cboos

  • 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.

Add/Change #2482 (Log changes aren't displayed)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.