Opened 9 years ago

Closed 14 months ago

PATCH: Inteface to trac-admin in Trac 0.11

Reported by: Owned by: Ilmars Poikans Ryan J Ollos low DownloadsPlugin normal 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.

comment:1 Changed 9 years ago by Radek Bartoň

Status: new → 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:3 Changed 9 years ago by galaktor

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

comment:4 Changed 9 years ago by Radek Bartoň

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 9 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 9 years ago by Radek Bartoň

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 8 years ago by Ryan J Ollos

Summary: Inteface to trac-admin in version 0.11 → [Patch] Inteface to trac-admin in version 0.11

comment:8 Changed 7 years ago by Radek Bartoň

Priority: normal → low

comment:9 Changed 7 years ago by Radek Bartoň

Summary: [Patch] Inteface to trac-admin in version 0.11 → PATCH: Inteface to trac-admin in Trac 0.11

comment:10 Changed 4 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos

comment:11 Changed 14 months ago by Ryan J Ollos

Resolution: → fixed assigned → closed

0.11 is obsolete and no longer supported.

comment:12 Changed 14 months ago by Ryan J Ollos

Resolution: fixed → wontfix

Modify Ticket

Change Properties