Red Hat Bugzilla – Bug 694698
Request for "publican rename" feature
Last modified: 2011-07-25 20:42:42 EDT
Description of problem:
When I change the title of a book, I have to change it in a billion (ok, 4) places and it's annoying and takes time better spent elsewhere.
Very, with any new product comes name changes (and title changes).
Steps to Reproduce:
1. Make a book with Title1.
2. Get word that your book now needs to have Title2.
3. Change the title in a billion places.
4. Get annoyed.
"Ugh, another name change?" and grumbling.
"Another name change? Sure, no problem!" and jubilation.
Please, sirs, can I have:
1. publican clean
2. change: the name of ent and xml files, and that entity, and the book_info <title> element, to be all the same thing
Well we have a distinct lack of jubilation, but the problem I see with this is SCM related. The files will no longer match what is in SVN/GIT/??? and that will have to be done manually.
Just to clarify:
(In reply to comment #2)
> Well we have a distinct lack of jubilation,
This is sad but true, and it would be nice to get some jubilation!
> but the problem I see with this is
> SCM related. The files will no longer match what is in SVN/GIT/??? and that
> will have to be done manually.
If you are OK with this limitation then we can do this for Publican 3.
Hooray, I thought it was a rule that everyone's first RFE gets shot down, so that's great news! I feel...I feel...jubilant!
I'm perfectly happy with that limitation, especially if publican rename gives me a friendly reminder to move about my files when it has successfully completed. (*hint hint*)
As part of #688585 a new parameter was added, mainfile, so I should be able to get this working without renaming any files, which makes the impact on repositories go away!
<jubilation in the village>
Added rename action.
Committed revision 1758.
$ publican --help rename
Rename a publican book
<snip common options>
--name=<NAME> The name of the book, article, set, or brand
--product=<PRODUCT> The name of the product
--version=<VERSION> The version of the product
$ publican package --lang en-US
$ publican rename --name "New Book Name" --product "New Product" --version 3.0
$ publican package --lang en-US
$ svn status
Back ported to branches/publican-2x
Committed revision 1810.
Hi Jeff, I'm just testing this to make the stage all better, and I'm not sure what the expected behavior of this is. I thought it would rename the actual local .ent and .xml files or even the folder itself, but all I can see is it changing the <productname>, <productnumber> and <title> in the Book_Info.xml.
I have probably completely misunderstood, haven't I?
(In reply to comment #9)
> Hi Jeff, I'm just testing this to make the stage all better, and I'm not sure
> what the expected behavior of this is. I thought it would rename the actual
> local .ent and .xml files or even the folder itself, but all I can see is it
> changing the <productname>, <productnumber> and <title> in the Book_Info.xml.
> I have probably completely misunderstood, haven't I?
Hi, changing the file names would mean having to work out what SCM was being used then supporting every SCM to rename the file and not lose history. This was deemed too error prone. So what we do is modify the publican config so that it uses the new book name and the old book file, meaning we keep SCM history and don't need to rename files. Building the package should use the new book name.
Okay, thanks. In that case, I can verify that this works as expected!