PDA

View Full Version : How to use BC to manage software versions?


InquiringMinds
12-Oct-2004, 09:05 AM
I have been exchanging email with Chris Kennedy on the support team. I thought I would post the query here so that others can comment.

Here's my problem:

I am developing a software application. There are two of us writing code. It is a Visual Basic 6 application. There is a single project file with about 25 modules plus a few Access database files, some sound and graphics files, and some documentation files.

In an attempt to keep things straight, I created a folder structure where all of the development files for a particular version are in a separate folder tree:

\VBDemo
\VBDemo\Ver20040930
\VBDemo\Ver20040930\Code
\VBDemo\Ver20040930\Data
\VBDemo\Ver20040930\Docs
\VBDemo\Ver20040930\Graphics
\VBDemo\Ver20040930\Sounds

When it’s time to create a new version (e.g., Ver20041012), I would create a new version folder:

\VBDemo
\VBDemo\Ver20040930
\VBDemo\Ver20040930\Code
\VBDemo\Ver20040930\Data
\VBDemo\Ver20040930\Docs
\VBDemo\Ver20040930\Graphics
\VBDemo\Ver20040930\Sounds
\VBDemo\Ver20041012

and then copy the entire folder tree to the new folder tree:

\VBDemo
\VBDemo\Ver20040930
\VBDemo\Ver20040930\Code
\VBDemo\Ver20040930\Data
\VBDemo\Ver20040930\Docs
\VBDemo\Ver20040930\Graphics
\VBDemo\Ver20040930\Sounds
\VBDemo\Ver20041012
\VBDemo\Ver20041012\Code
\VBDemo\Ver20041012\Data
\VBDemo\Ver20041012\Docs
\VBDemo\Ver20041012\Graphics
\VBDemo\Ver20041012\Sounds

I then Zip up the old folder tree, store it in another folder of old version zip files, and delete the old development tree:

\VBDemo
\VBDemo\Old
\VBDemo\Old\Ver20040815.zip
\VBDemo\Old\Ver20040902.zip
\VBDemo\Old\Ver20040930.zip
\VBDemo\Ver20041012
\VBDemo\Ver20041012\Code
\VBDemo\Ver20041012\Data
\VBDemo\Ver20041012\Docs
\VBDemo\Ver20041012\Graphics
\VBDemo\Ver20041012\Sounds

This is where the problem arises. I would like to be able to right-click on \VBDemo\Ver20041012 and tell BC to make it the left side and then right-click on \VBDemo\Old\Ver20040930.zip and tell BC to do the compare. There appear to be 2 problems with this: (1) The compare fails at the highest level because BC does not recognize that the Zip file is just a shell containing the data to be compared. (2) Even if BC would step down one level on the Zip file side, the folder names do not agree and BC will not get past that.

I would also like to be able to right-click on 2 of the zip files in the \Old folder and have BC show me where the differences are. This fails for reason (2) above. I need a way to tell BC to ignore the folder name at the highest level and compare the contents. I would think this would be a useful option for things like software development where there are named versions.

Is there a way to do this?

Is there a different folder structure that would be more amenable to making the compares work better?

How does the BC development team manage versions and making comparisons?

Thanks

PS: Is there any way to make the Post window larger so when I am composing my post I can see more than 5 lines at a time?

Chris
12-Oct-2004, 02:12 PM
To manage comparisons we set up a folder structure like:

\Project1\Developer1Name
\Project1\Developer2Name

When Developer1 has made stable changes to Project1, he tells Developer2, and Developer2 merges the changes from the Developer1 folder into their own folder.

This way you can have a saved session that compares your folder against the other developer's folder, with the other dev's folder checked "read-only".

To backup files before a merge, select all files on your side and use the CopyTo command to copy to an archive folder like "\Project1\Developer1Name\Archive\20041012". You can make the CopyTo target a .zip file, and BC will create it if it doesn't exist.

To make the post text entry boxes bigger, click the My Home link. Click on the Display preferences, number of shown threads, languages, colors... link. You can change the TextArea columns and TextArea rows to get more space to enter your text.

chrroe
13-Oct-2004, 12:44 AM
Hi!

Sorry, I have no better suggestion for solving your concrete problem, but it seems for me, that you reinvent the wheel:

Have you ever tried to manage your project with a Concurrent Versions System?
I have made good experience using WinCVS (http://cvsgui.sourceforge.net) .

Especially when you have more than one developer it can be very usefull. BC can be integrated as Diff-Tool to show differences between certain versions of a file.

Maybe it is worth a try ...

Bye

14-Oct-2004, 03:06 AM
I have a similar situation and solve it by putting the old version in a main folder with a version-date that does not become content of the zip file. Thus the content with subfolders is exactly the same naming-structure as your original folders - only the zip file and the top-folder have a version-date.
I'm even using BC2 to make daily/hourly backups/synchs directly to zip files with the exact content and only the zip-name gets a timestamp with %date%-%time% (set your regional settings separator for time to sth else then ":" or the file name will be invalid).
If you think this way could work for you I can supply you with more detailed scripts by mail - some samples to give you a general idea below ...

1) Sync the server-folders with my last backup (%1 is servername in the calling script, %2 is the environement of the server); filter is of course optional:
___________________________

load "\\%1\F$\mw_globe\" "C:\Work\Servers\Servers.zip\%2\%1"
filter "-activity*\;-bin*\;-log*\;-tivoli\;-GLOBE*\;-MQEx*\;-RFC*\;-script*\;-move*\;-backup\;-packages\;-MQSeries*;-split*\;-test*\"
sync create-empty mirror:lt->rt

After synching make a backup copy of the new zip file and rename it to <name>-%date%-%time% (report is optional but gives me a fast overview what I changed between the two backups):
__________________________

load "C:\Work\Servers\Servers.zip" "C:\Work\Servers\Copy\Servers.zip"
expand all
folder-report layout:side-by-side options:display-mismatches output-to:"C:\Work\Repartees\Servers-%date%-%time%.htm" output-options:html-color

load "C:\Work\Servers\"
filter "Servers.zip"
select left.all.files
copyto "C:\Work\Servers\Copy\"
rename regexpr Servers.zip Servers-%date%-%time%.zip

01-Nov-2004, 12:19 PM
I second chrroe's recommendation for using something like cvs. You may want to also check out subversion (http://subversion.tigris.org/). Subversion is intended to the successor to cvs (not much wrong with cvs though). Running svnserve (the standalone server) on a win32 machine is really easy, and the Tortoise SVN (http://tortoisesvn.tigris.org/) client integrates super nicely into Windows file explorer. (Plus, of course, you can tell it to use BC2 as the diff program.) :) Using something like svn or cvs would save you a lot of headaches with folder renaming for versions, and you'll have advanced abilities such as branching, patches and version histories.