logo       

[PATCH] svk commit -m 'bla bla' --template: msg#00002

version-control.svk.devel

Subject: [PATCH] svk commit -m 'bla bla' --template

This patch adds a "--template" option to all of the svk commands which take -m/-F. When used, it tells svk that any -m or -F argument should be interpreted as a template: that is, the editor is invoked, but with whatever value is specified by -m/-F already filled in. (-- template is ignored if neither -m nor -F is specified.) Note that there's no sort of "substitution" in this template; perhaps there should be. If so, perhaps clkao should decree "the future syntax for templates might look like this" and we can document that if you use such a syntax, it might mean something in the future.

For proof that this is useful, attached is "rt-commit", a script which you run like:
$ rt-commit TICKETNUMBER [ other args to commit ]
which runs "svk commit" with a tempate of
RT-Ticket: TICKETNUMBER
RT-Status: resolved
RT-Update: correspond
for those of us using RT with svn integration. (Allowing -m/-F with rt-commit, alternate statuses, etc, is an exercise for the reader.)

Attachment: rt-commit
Description: Binary data

Attachment: svk-commit-template.patch
Description: Binary data


--dave
Code Monkey, Best Practical Solutions
--
David Glasser | glasser@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise