From c572edaaf2c5bf7d8a9fde4f787752790eab6ac5 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 18 2011 17:55:01 +0000 Subject: Update texinfo documentation backend inside `help' functionality: - Move "Print action message" and MANUAL_ENTRY verification from `texinfo_deleteEntry' functionality to specific functionalities (e.g., `texinfo_deleteEntrySection', `texinfo_deleteEntryChapter', `texinfo_deleteEntryManual'). This code movement is needed in order for both "Print action message" an MANUAL_ENTRY verification to happen when renaming actions take place inside the working copy. Otherwise, if both "Print action message" and MANUAL_ENTRY verification actions are outside specific functionalities, they won't be realized when a documentation entry be renamed inside the working copy. - Revert pending changes on MANUAL_ENTRY before deleting it. --- diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh index 47ec256..a58ff1b 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh @@ -28,13 +28,6 @@ function texinfo_deleteEntry { # Print separator line. cli_printMessage '-' --as-separator-line - # Print action message. - cli_printMessage "$MANUAL_ENTRY" --as-deleting-line - - # Verify existence of documentation entry before deleting it. We - # cannot delete an entry which doesn't exist. - cli_checkFiles "$MANUAL_ENTRY" - # Remove manual, chapter or section based on documentation entry # provided as non-option argument to `centos-art.sh' script. if [[ ${MANUAL_SECN[$MANUAL_DOCENTRY_ID]} != '' ]];then diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh index a7c14c4..9ffa534 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh @@ -25,6 +25,13 @@ function texinfo_deleteEntryChapter { + # Print action message. + cli_printMessage "$MANUAL_ENTRY" --as-deleting-line + + # Verify existence of documentation entry before deleting it. We + # cannot delete an entry which doesn't exist. + cli_checkFiles "$MANUAL_ENTRY" + # Build list of section entries inside the chapter. This is # required to delete cross references from other section entries # that point to section entries inside the chapter that will be @@ -33,6 +40,9 @@ function texinfo_deleteEntryChapter { --pattern=".+\.${MANUAL_EXTENSION}" \ | egrep -v '/chapter') + # Revert pending changes before deleting. + svn revert ${MANUAL_CHAPTER_DIR} --quiet --recursive + # Remove chapter directory using subversion to register the # change. svn del ${MANUAL_CHAPTER_DIR} --quiet diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryManual.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryManual.sh index 7b856f5..b15375e 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryManual.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntryManual.sh @@ -25,6 +25,16 @@ function texinfo_deleteEntryManual { + # Print action message. + cli_printMessage "$MANUAL_ENTRY" --as-deleting-line + + # Verify existence of documentation entry before deleting it. We + # cannot delete an entry which doesn't exist. + cli_checkFiles "$MANUAL_ENTRY" + + # Revert pending changes before deleting. + svn revert ${MANUAL_BASEDIR_L10N} --quiet --recursive + # Remove locale-specific documentation manual directory from the # working copy. Using subversion to register the change. Be sure # that related output files are removed too. diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntrySection.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntrySection.sh index 6e25499..da4f782 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntrySection.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntrySection.sh @@ -25,6 +25,17 @@ function texinfo_deleteEntrySection { + # Print action message. + cli_printMessage "$MANUAL_ENTRY" --as-deleting-line + + # Verify existence of documentation entry before deleting it. We + # cannot delete an entry which doesn't exist. + cli_checkFiles "$MANUAL_ENTRY" + + # Revert pending changes inside the section entry in order to + # prepare the file for deletion. + svn revert $MANUAL_ENTRY --quiet + # Remove documentation entry using subversion to register the # change. svn del $MANUAL_ENTRY --quiet