Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#729 closed enhancement (fixed)

Remove wiki pages with trac-admin

Reported by: tv+nospam.edgewall_com.2a55fe@… Owned by: daniel
Priority: low Milestone: 0.9
Component: admin/console Version: 0.8.1
Severity: normal Keywords: helpwanted patch
Cc: nslater@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christopher Lenz)

There should be a way to remove wiki pages from the command line. Something like:

trac-admin ENV wiki remove PageName

Attachments (1)

patch (1.8 KB ) - added by nslater@… 20 years ago.
unified diff patch file for trac-admin

Download all attachments as: .zip

Change History (10)

comment:1 by Matthew Good <matt-good.net>, 20 years ago

Changeset [834] made it possible to delete Wiki pages through the web interface, so this should be available in version 0.8. I believe this would be the preferred way to delete Wiki pages. The changeset also provides a way to only delete a specific revision (i.e. revert the page), which would be easier to do through the web since you could see which revision you were deleting.

Is there a particular reason for wanting to perform the deletion through the command line as opposed to the web interface?

I believe the trac-admin tool should be reserved for initializing the environment and backend operations such as upgrading the database, importing a directory of Wiki pages, etc.

comment:2 by hpk at trillke net, 20 years ago

I think it would make sense to be able to delete wiki pages.

For instance, i want my trac projects to start from scratch with just very few bootstrap pages. The welcome page will have a pointer to the central trac wiki because it makes no sense to me to duplicate these pages.

So going to all wiki pages and deleting them through the web seems somewhat cumbersome.

comment:3 by daniel, 20 years ago

Resolution: wontfix
Status: newclosed

the direction of Trac is to move away from trac-admin, in particularly for 2.0+.

Since it's already possible to delete pages from the standard web interface, it doesn't make much sense unless we have an extensive set of wiki page manipulation commands.

comment:4 by nslater@…, 20 years ago

Cc: nslater@… added
Resolution: wontfix
Severity: enhancementnormal
Status: closedreopened

I agree with Matthew Good and think this ticket should be looked at again.

I am in the process of installing multiple Trac environments on a host and am writing a simple shell script that automatically sets them up for me. It has only now come to my attention that there is no way with this script to remove Trac's default Wiki contents.

Obviously for a new project, it is not desirable to start with Tracs default pages. But to have to use the web interface to initialise my Trac environments has seriously hindered my attempts at writing an automatic Trac install script.

Please provide a way to flush or delete Wiki pages via the command line. It makes logical sense, as every other element of trac-admin has an associated remove command.

comment:5 by Christopher Lenz, 20 years ago

Description: modified (diff)
Keywords: helpwanted added

I agree that this functionality would be nice. A patch would be welcome ;-)

comment:6 by nslater@…, 20 years ago

It just ocured to me that you can use SQLite to connect directly to the trac.db and remove the pages manualy with SQL statements. This is very hackish though and I'm only posting here in case it helps someone else with any automated scripts.

comment:7 by nslater@…, 20 years ago

I have attached a patch in unified diff format that fixes this problem.

I have never coded in python before, but I must say, this patch was a breeze. Sorry if I got anything wrong.

by nslater@…, 20 years ago

Attachment: patch added

unified diff patch file for trac-admin

comment:8 by anonymous, 20 years ago

Keywords: patch added
Version: 0.7.10.8.1

comment:9 by Christopher Lenz, 20 years ago

Milestone: 0.9
Priority: normallow
Resolution: fixed
Severity: normalenhancement
Status: reopenedclosed

Patch applied in [1316]. Thanks!

Modify Ticket

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