I was given a script but need to modify it so it reads the 3 line Subversion update between the delimeters "---------".
So if we search the Text or Revision number or Jira ID, the script will return the complete SVN update of all 3 lines between/before and after the line that has "----------" as the separation.
@echo off
setlocal enableDelayedExpansion
:: Define LF to contain a line feed character (0x0A)
set ^"LF=^
^" The above empty line is critical - DO NOT REMOVE
:: Define CR to contain a carriage return character (0x0D)
for /f %%A in ('copy /Z "%~dpf0" nul') do set "CR=%%A"
:: Define the string to search for
set "s=%~1"
svn log https://subversion.company.com/svn/company-dev/|findstr /ri
/c:"!s!" /c:"!lf!.*!s!" /c:"!lf!.*!cr!*!lf!.*!s!" /c
:"!lf!.*!cr!*!lf!.*!cr!*!lf!.*!s!"
The output is usually like this:
-------------------------------------------------------------------------------------------------------------------------
r132536 | USERID | 2014-05-06 15:20:06 -0700 (Tue, 06 May 2014) | 2 lines
Interim checkin - use part rev from as worked item if exists
AERO ID: AERO-1107
-------------------------------------------------------------------------------------------------------------------------
So if any text is found between the "-----" print that text between the lines "----"