Edgewall Software
Modify

Opened 12 years ago

Closed 9 years ago

Last modified 12 months 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:
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 (0)

Change History (10)

comment:1 Changed 12 years ago by Matthew Good

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 12 years ago by Christian Boos

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 Changed 12 years ago by Christian Boos

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 Changed 12 years ago by Christopher Lenz

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

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 10 years ago by osimons

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

comment:8 Changed 10 years ago by Christian Boos

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

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 Changed 9 years ago by Christian Boos

Milestone: 0.12
Resolution: duplicate
Status: newclosed

See #6016.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted.
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.