Modify

Opened 5 years ago

Last modified 7 months ago

#5236 assigned enhancement

PATCH: Inteface to trac-admin in Trac 0.11

Reported by: ilmars Owned by: rjollos
Priority: low Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Do I understand correctly that interface to trac-admin download commands is available only in plugin version 0.12? Would it be possible to port this functionality back to version 0.11 too? I'm using DownloadsPlugin version for Trac 0.11 and I don't think we will upgrade soon, because Trac 0.12 is at least 2 month before release. I have scripts that builds several projects which is managed in Trac, but I miss very much feature to add files to Download section via command line.

Attachments (1)

trac-downloads-admin.py (4.8 KB) - added by Blackhex 5 years ago.
Unfinished implementation of trac-admin replacement with DownloadsPlugin support.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by Blackhex

  • Status changed from new to assigned

Implement this in 0.11 is a bit complicated since there are no extension points to trac-admin command. The only way is to implement separate trac-downloads-admin.py script, that I have partially done already, which inherits behaviour of trac-admin and extends it. Futhermore, there are problems of populating some state variables to internal API component which relies on them so part of the functionality of API component would have to be duplicated. This doesn't mean that you can't use 0.12 branch of the plugin with new features with Trac 0.11 since it is, except of this feature, compatible.

comment:2 Changed 5 years ago by Blackhex

Opps, sorry for bad formatting.

Changed 5 years ago by Blackhex

Unfinished implementation of trac-admin replacement with DownloadsPlugin support.

comment:3 Changed 5 years ago by galaktor

Could you give a trac-newb like me a short description on how to use this attatchment?

comment:4 Changed 5 years ago by Blackhex

This is a Python script similar to trac-admin so instead of calling trac-admin <path_to_env> download list you call ./trac-downloads-admin.py <path_to_evn> downloads list. However the script is not finished so downloads add feature is not implemented. You need some Python and Trac programming skills to finish it.

comment:5 Changed 5 years ago by galaktor

I must admit that I am not sure where to include this script. Where do I place it so it's found? Do I call the file directly ("mydir> trac-downloads-admin.py ...")? I played around a bit but I get python errors due to unavailable package "tracdownloads.api".

Anyways, I guess I will wait until there's a stable Trac 0.12 until I consider upgrading. You don't happen to know how risky an upgrade from 0.11.4 to 0.12dev would be?

Thanks again for your efforts :-)

comment:6 Changed 5 years ago by Blackhex

You can place it anywhere but you have to setup PYTHONPATH environment variable to contain path to Trac (usually in site-packages and already in PYTHONPATH) and TracDownloadsPlugin (usually in <path_to_env>/plugins) libraries. Then you can call it directly.

Upgrade to 0.12 from 0.11 should be clearer that upgrade from 0.10 to 0.11 since there were not so much changes but you should rather ask on #trac IRC channel where are more experienced users.

comment:7 Changed 5 years ago by rjollos

  • Summary changed from Inteface to trac-admin in version 0.11 to [Patch] Inteface to trac-admin in version 0.11

comment:8 Changed 4 years ago by Blackhex

  • Priority changed from normal to low

comment:9 Changed 4 years ago by Blackhex

  • Summary changed from [Patch] Inteface to trac-admin in version 0.11 to PATCH: Inteface to trac-admin in Trac 0.11

comment:10 Changed 7 months ago by rjollos

  • Owner changed from Blackhex to rjollos

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.