Edgewall Software
Modify

Ticket #2482 (closed enhancement: duplicate)

Opened 6 years ago

Last modified 3 years ago

document usage of post-revprop-change script

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

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

comment:1 Changed 6 years ago by mgood

  • Resolution set to worksforme
  • Status changed from new to closed

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

comment:2 Changed 6 years ago by cboos

  • Component changed from timeline to version control
  • Resolution worksforme deleted
  • Status changed from closed to reopened

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 Changed 6 years ago by cboos

  • Milestone set to 1.0
  • Owner changed from jonas to cboos
  • Status changed from reopened to new
  • Type changed from defect to enhancement

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

comment:4 Changed 6 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?

comment:5 Changed 6 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 ;)

comment:6 Changed 6 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.

comment:7 Changed 4 years ago by osimons

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

comment:8 Changed 4 years 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.

comment:9 Changed 3 years ago by cboos

  • Keywords multirepos added; svn log changes removed
  • Milestone changed from 1.0 to 0.12
  • Summary changed from Log changes aren't displayed to document 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 Changed 3 years ago by cboos

  • Milestone 0.12 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #6016.

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.