Opened 15 years ago
Closed 15 years ago
#9087 closed enhancement (wontfix)
[patch] Add sync command to trac-admin
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | 0.11-stable |
Severity: | normal | Keywords: | svnsync |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I contribute to a project that uses subversion but, sadly, not trac. Thus I have created a local subversion mirror via svnsync and a trac instance on top of it. What this means for trac is that changesets materialize in groups, and visiting timeline or browser may require caching multiple changesets. Since I'm mirroring a remote repository ticket references are to a remote bug tracking system as well; I adapted code from mantis integration plugins to put ticket title into the ticket link when repository revisions are cached.
The end result is that synchronizing revisions may take noticeable time. Instead of synchronizing on demand like trac does currently, I know I can synchronize right after each svnsync run to get trac up-to-date on new changesets, if any. That's when I discovered that there is no 'trac-admin sync'. This patch remedies the situation, adding a sync command to trac-admin.
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | patch-sync_command added |
---|
follow-up: 2 comment:1 by , 15 years ago
Keywords: | svnsync added |
---|---|
Milestone: | → 0.11.7 |
Thanks! While this is already implemented in 0.12, I think adding this in 0.11 can perhaps be of some use, if only in the svnsync situation (another use is to spread the idea that sync()
should better happen externally for performance reasons ;-) ).
So I'm in favor of integrating the patch for 0.11.7.
follow-up: 3 comment:2 by , 15 years ago
I admit I haven't investigated 0.12 thoroughly, but from what I understand 0.12 provides a way to tell trac to cache a particular changeset. That functionality is somewhat orthogonal to synchronization as proposed in this ticket.
In the svnsync situation as described, as a sysadmin, it's much easier for me to run trac-admin sync
after svnsync
than put together post-commit hooks. In addition, it's wasteful to repeatedly launch trac after each changeset. If, say, 10 changesets are mirrored I would like to simply tell trac "sync everything".
So unless this functionality already exists in 0.12 it still would need a version of this patch, which is "check repository and cache any new revisions without destroying revisions already cached".
follow-up: 4 comment:3 by , 15 years ago
Replying to anonymous:
In the svnsync situation as described, as a sysadmin, it's much easier for me to run
trac-admin sync
aftersvnsync
than put together post-commit hooks. In addition, it's wasteful to repeatedly launch trac after each changeset. If, say, 10 changesets are mirrored I would like to simply tell trac "sync everything".
You can pass any number of revisions to trac-admin $ENV changeset added
, so a single call is all that's needed. Also, there is already a trac-admin $ENV repository sync
that does exactly what your patch does. So the functionality you need is already implemented (twice) in 0.12.
As for adding the functionality to 0.11, I'm -0 (remember we said "no new functionality in 0.11"?). I'd rather encourage people to migrate to 0.12 rather than give them an incentive to stay on 0.11.
comment:4 by , 15 years ago
Milestone: | 0.11.7 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Replying to rblank:
As for adding the functionality to 0.11, I'm -0 (remember we said "no new functionality in 0.11"?).
Except for whenever we feel like breaking the rules ;-)
But more importantly, the syntax won't be the same (sync
vs. repository sync
), so any script using it will have to be rewritten, yet another API change to explain, …
I'd rather encourage people to migrate to 0.12 rather than give them an incentive to stay on 0.11.
So yes, we'd better leave things just like they are. If someone really needs the feature for 0.11.6, applying the patch given here is simple enough, otherwise just upgrade to 0.12.
Patch adding sync command to trac-admin