From The T.I.E.&M. Shop...
Dear SemWare,
I think it would be terrific if one of the TSE .cfg options was a defineable
backup setup.
You can now turn backups on and off, but as far as I know, that's all.
Many painful times, I have backed up too often using the same filename after
making changes in my text files, especially my programming source files. I
find out only too late that I should have made another version number
adjustment to the filename so that I would create a new file and leave the
precious series of files untouched when I go into making more additions to
the program source.
To keep this from happening, it occurred to me that perhaps TSE could be made
to rename the backups I manually make with an incremented version number
and/or multiple backup saves, using these functions:
VerSave() Save current file using next version backup
GVerSave() Global save correct extensions using next version backup
The first version save might work something like this: say TSE has the
ability to utilize intelligent numbering in the filename, I could use a
specially adapted SaveFile() function which would increment the filename with
a one's digit increase, like:
tsejig03.c ==> tsejig04.c
or
tsejig.001 ==> tsejig.002
When I give the VerSave() function command, the name would automatically be
changed from tsejig03.c to tsejig04.c and then saved.
(The SaveFile() command would still work like it does now using the .bak
extension. The VerSave() would only work on the version backups.)
In the configuration file, one might even be able to choose where in the
filename the version digits would occur and how many, possibly like so:
VersionBackups = On
VersionNaming = filenxxx.ext (or: filename.bxx, etc.)
VersionsLimit = 50
VersionStart = 001
VersionExtensions = "s c asm h pas inc bas"
This would tell TSE to use VerSave() to name the file saved with x's number
of version digits, incremented by one when saved. It also tells TSE how many
versions to save, where to start version numbering, and the file extensions
which the versions function applies to.
Obviously, this new function should only work on the current file, or only on
files with the correct extensions, as some of your other functions work. The
global function would only work on correct extensions.
If this is too involved, the second method could be simpler, by allowing a
user to set the number of backups as a retained history.
In the .cfg file, the following might exist:
BackupsNumber = 16
This parameter would make TSE use the last 2 digits in the default backup
extension for numbering up to 16 backups of the working file. In the
directory, you would wind up with the 16 most recently saved backups. The
numbering could continue all the way up to 99, but only the last 16 would
actually exist. After 99, the extensions numbering would go around the corner
and begin again at 01.
When I was writing my messagebase utility for Proboard this year, I wound up
with some 40 backup versions of the source, but I made mistakes saving them
several times, writing over good code I wanted to review later on, or wiping
out a recently written "good" piece of programming!!! :(
I would set the parameter to 50... :-}
I hope I have adequately explained the idea. It would be nice to have.
TAFN
See you.
Larry
--- GEcho 1.20/Pro
---------------
* Origin: The T.I.E.&M. Shop Mississippi River (1:282/4111)
|