Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#9087 closed enhancement (wontfix)

[patch] Add sync command to trac-admin

Reported by: oleg@… 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)

patch-sync_command (1.3 KB ) - added by oleg@… 15 years ago.
Patch adding sync command to trac-admin

Download all attachments as: .zip

Change History (5)

by oleg@…, 15 years ago

Attachment: patch-sync_command added

Patch adding sync command to trac-admin

comment:1 by Christian Boos, 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.

Last edited 15 years ago by Christian Boos (previous) (diff)

in reply to:  1 ; comment:2 by anonymous, 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".

in reply to:  2 ; comment:3 by Remy Blank, 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 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".

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.

in reply to:  3 comment:4 by Christian Boos, 15 years ago

Milestone: 0.11.7
Resolution: wontfix
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.