Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2265 closed enhancement (worksforme)

Add batch mode to trac-admin

Reported by: damphyr@… Owned by: daniel
Priority: low Milestone:
Component: admin/console Version: devel
Severity: normal Keywords: admin
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When following process specifications most new projects look alike when starting.

It would be useful to add the capability to the trac-admin script to process commands supplied from a file.

My current workaround is to build a script that calls trac-admin multiple times, but it would be much more elegant to have trac-admin read the commands from a file.

Attachments (0)

Change History (2)

comment:1 by dserodio@…, 19 years ago

Component: generaltrac-admin
Owner: changed from Jonas Borgström to daniel

trac-admin reads from stdin, so you can pipe your batch to trac-admin, eg.:

echo "milestone rename milestone1 M1
milestone rename milestone2 M2" | trac-admin $TRAC_ENV

comment:2 by Matthew Good, 19 years ago

Resolution: worksforme
Status: newclosed

You don't even need to use echo, since you can directly pipe a file into the process:

$ trac-admin /path/to/env < trac-commands.txt

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.