#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: |
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 by , 19 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
Component: | timeline → version control |
---|---|
Resolution: | worksforme |
Status: | closed → 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 TracAdminresync
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 , 19 years ago
Milestone: | → 1.0 |
---|---|
Owner: | changed from | to
Status: | reopened → new |
Type: | defect → enhancement |
I'll try to write such a post-revprop-change
hook.
comment:4 by , 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 , 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 , 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 , 17 years ago
This ticket is > 2 years since last update. Is this still relevant as a Trac issue?
comment:8 by , 17 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 , 16 years ago
Keywords: | multirepos added; svn log changes removed |
---|---|
Milestone: | 1.0 → 0.12 |
Summary: | Log changes aren't displayed → 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 by , 16 years ago
Milestone: | 0.12 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
See #6016.
you need to use the trac-admin command "resync"