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. How reproducible: 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. Actual results: "Ugh, another name change?" and grumbling. Expected results: "Another name change? Sure, no problem!" and jubilation. Additional info: Please, sirs, can I have: "publican rename" 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
+1!
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. Cheers, Jeff.
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. Cheers, Jeff.
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> :D
Added rename action. Committed revision 1758. $ publican --help rename rename Rename a publican book Options: <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 Wrote: /home/jfearn/Source/fedora/publican/trunk/publican/Users_Guide/build/rpm/Publican-Users_Guide-2.6-web-en-US-2.6-1.el5.src.rpm $ publican rename --name "New Book Name" --product "New Product" --version 3.0 $ publican package --lang en-US /Wrote: home/jfearn/Source/fedora/publican/trunk/publican/Users_Guide/build/rpm/New_Product-New_Book_Name-3.0-web-en-US-2.6-1.el5.src.rpm $ svn status M en-US/Book_Info.xml M publican.cfg
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. Cheers, Jeff.
Okay, thanks. In that case, I can verify that this works as expected!