Alrighty - I'm not sure how much this will help, but I'll give you what
I can...
What you need is a way to auto-diff the files to determine what has
actually changed...well, that's one thing anyway. Maybe an auto-merge
would be helpful as well.
If there is a way to do a text level diff, it would probably be
completely impractical due to the time it would take. However, by
applying labels, you might be able to get the same result.
The basic theory is this:
1) Apply a build label to all the elements in the initial branch
2) Edit the script below to GET by label for the previous build
3) Edit the script below to DIFF based on new label vs previous label
4) Pipe the results into a text file
Here's the part you'd need to write from scratch:
Write a quick "for i in diff.txt" script that will run the vss merge
via command line. This will take you through every single item that
has actually changed.
I'm pasting a portion of our old build scripts below, in the hopes that
you can edit it to suit your needs. I've removed everything
proprietary. This is the portion of the script that applies the
labels, does the get and then the diff.
Last comment from me: Not all integrated systems are like Rational. If
you've had a bad expereince with Rational, please don't let that stop
you from looking at the truely good, powerful and FLEXIBLE integrated
tools that are out there
Here's portions of two scripts:
@echo off
if /i "%VSSLABEL%"=="TIP" goto END
Rem Line below will call build.cmd first and then call this file to
make sure the environment is set
If "%BuildDrive%" =="" goto Recall
SETLOCAL
Rem Take away 1 from current build number (VSSLABEL) if the LastBuild
isn't defined
IF "%LASTBUILD%"=="" SET /A LastBuild=VSSLABEL-1
SET VSSReportf=%DestPath%\VSS_Changes_%LastBuild%_to_% VSSLABEL%.wri
SET
VSSReportb=%DestPath%\VSS_Changes_%LastBuild%_to_% VSSLABEL%_Summary.wri
SET
VSSReportfS=%DestPath%\VSS_Source_Changes_%LastBui ld%_to_%VSSLABEL%.wri
SET
VSSReportbS=%DestPath%\VSS_Source_Changes_%LastBui ld%_to_%VSSLABEL%_Summary.wri
@echo VSS Report - Build %VSSLABEL% to %LastBuild% full
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo VSS Report - Build %VSSLABEL% to %LastBuild% full >>"%OUTLOG%"
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
%SSDIR%\WIN32\SS History "%VSSProj%" -O"%VSSReportf%"
-VL"%BTYPE%_%VSSLABEL%"~"L%BTYPE%_%LastBuild%" -R
%SSDIR%\WIN32\SS History "%VSSProj%/Source" -O"%VSSReportfS%"
-VL"%BTYPE%_%VSSLABEL%"~"L%BTYPE%_%LastBuild%" -R
@echo VSS Report - Build %VSSLABEL% to %LastBuild% brief
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo VSS Report - Build %VSSLABEL% to %LastBuild% brief
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
%SSDIR%\WIN32\SS History "%VSSProj%" -O"%VSSReportb%"
-VL"%BTYPE%_%VSSLABEL%"~"L%BTYPE%_%LastBuild%" -B -R
%SSDIR%\WIN32\SS History "%VSSProj%/Source" -O"%VSSReportbS%"
-VL"%BTYPE%_%VSSLABEL%"~"L%BTYPE%_%LastBuild%" -B -R
@echo VSS Report - End
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo VSS Report - End >>"%OUTLOG%"
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
CD /d "%BasePath%"
EndLocal
goto End
:Recall
Rem Call the build.cmd file to setup environment and recall this
script.
Call Build %0 Recall
:END
And the next script:
@echo off
Rem Line below will call build.cmd first and then call this file to
make sure the environment is set
If "%BuildDrive%" =="" goto Recall
@echo BUILD - Label Source Code in VSS (%VSSLabel%) if required
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo BUILD - Label Source Code in VSS (%VSSLabel%) if required
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
Rem Only Label when user is SSUser is set to Build, VssLabel isn't
"TIP" and SSRelabel is set to Y.
if /i "%SSUSER%"=="build" if /i not "%VSSLabel%"=="TIP" if /i
"%SSRelabel%"=="Y" %SSDIR%\WIN32\SS Label "%VSSProj%"
-L"%BTYPE%_%VSSLabel%" %VSSReply% -C"Built %VSSLabel% on
%COMPUTERNAME%" "-O&%OUTLOG%"
if /i "%SSUSER%"=="build" if /i not "%VSSLabel%"=="TIP" if /i
"%SSRelabel%"=="Y" %SSDIR%\WIN32\SS Label "$/Utilities"
-L"%BTYPE%_%VSSLabel%" %VSSReply% -C"Built %VSSLabel% on
%COMPUTERNAME%" "-O&%OUTLOG%"
@echo BUILD - Get Source Code with %VSSLabel% Label
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo BUILD - Get Source Code with %VSSLabel% Label
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
Rem Get Source with or without label when SSReget is Y
if /i "%VSSLabel%"=="TIP" if /i "%SSReget%"=="Y" %SSDIR%\WIN32\SS
GET "%VSSPROJ%/Source" -R -GTM -GL"%BasePath%\Source" -I-N
"-O&%OUTLOG%"
if /i Not "%VSSLabel%"=="TIP" if /i "%SSReget%"=="Y" %SSDIR%\WIN32\SS
GET "%VSSPROJ%/Source" -R -VL"%BTYPE%_%VSSLabel%" -GTM
-GL"%BasePath%\Source" -I-N "-O&%OUTLOG%"
@echo BUILD - End
@echo.
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo BUILD - End >>"%OUTLOG%"
@echo
------------------------------------------------------->>"%OUTLOG%"
@echo.
goto End
:Recall
Rem Call the build.cmd file to setup environment and recall this
script.
Call Build %0 Recall
:End
subs@adamsutton.co.uk wrote:
Quote:
|
Ta for the response Fran, I am certainly reading a lot about the problem with VSS, but there are several problems which make it difficult for me to begin suggesting sweeping changes within the company. As a explained in my previous post, I have only just joined the company and I am very junior. The company has been using VSS for several years and I have not heard anybody complain about major problems, though I know there are certainly people who I have heard grumble a little (but having only just started here its difficult to truely guage peoples opinions). Also a lot of people don't really seem to use VSS properly, quite probably because its so lacking in features they resort to other haphazard personal techniques and then use VSS just for code sharing and keeping a basic history of our source code. Though this might only be indicative of the small project I am working on and not others, again I have not yet been here long enough to guage things properly. I am certainly making a note of the deficiencies in VSS, which from my point of view are huge, I really can't see how anybody makes it work as a revision control system. As for a full blown change/configuration management system, I'm not a huge fan of integrated solutions, I often find them restrictive. I prefer to stick to the UNIX philsophy of using lots of smalls tools held together with a bit of glue. I find that way you get the tools you find most suitable for each aspect of the task. That said I cannot really comment on many change/config management / revision control tools, since I do not have all that much experience, and its not really something I am into spending too much time investigating. Personally once I find a tool (or set of) that I am happy with then I tend to stick with them. Also a lot of the other config/change management features we would use are currently management by in house tools, again I have yet to really come into contact with them (I think its an unfortunate consequence of the project I am on) and so cannot comment on their merits. However its difficult to come into a company and after a couple of months say "hey that tool your using is crap" but its a whole other story trying to tell them this when they have personally developed the tool in question. All that said, thanks for the response and the support. Adam
|