This is the mail archive of the
gnats-devel@sources.redhat.com
mailing list for the GNATS project.
Re: Renaming a category?
- To: Hans-Albert dot Schneider at mchp dot siemens dot de,gnats-devel at sources dot redhat dot com
- Subject: Re: Renaming a category?
- From: Yngve Svendsen <yngve dot svendsen at clustra dot com>
- Date: Mon, 23 Apr 2001 15:35:21 +0200
At 15:26 23.04.2001 +0200, Hans-Albert Schneider wrote:
>What is the preferred way to rename a category?
>
>For GNATS 3.113, I am currently aware of the following procedure
>(assume renaming from "A" to "B"):
>
>1) Create a new category "B".
>2) Edit each report in "A", changing the category to "B".
>3) Remove category "A".
>4) Run gen-index.
>
>(I once tried to just rename the directory from "A" to "B" (and
>the entry in gnats-adm/categories, of course), and found that
>gen-index produced A/17 instead of B/17, because the Category
>field had not been changed. This was probably with an earlier
>version than 3.113; is gen-index now more clever about this?)
>
>
>Is there an easier way? Maybe with version 4?
>
>In step 2), do I need to invoke edit-pr and manually edit all
>reports, or can I just run something like
>
> for each report $n in category A,
> sed -e "/^>Category:/ s/A/B/" < A/$n > B/$n
> rm A/$n
I don't think there is a better way. I have had to do the same thing myself
on a few occasions. Automating step 2 should be OK, though. Gnats4 has no
improvements with regards to this. This might be an idea for a new admin
tool in a future version.
Yngve Svendsen
IS Engineer
Clustra AS, Trondheim, Norway
yngve.svendsen@clustra.com
Cell.: +47 913 915 02