Recently, I had almost become a victim of a terrible loss of data [1]: By uploading a false JavaScript files I would have lost the fruit of almost two days of intensive programming work. Although It is my experience that the rewriting of the program in such cases provides a better result even if the first product but re-appears or can be restored. Even letters are gaining quality if they are tears after writing and completely re-writes!
Still, I try, of course, reasonably, to avoid possible data loss. In the SAP system I manage this by sharing my frequent changes to the test system. Although this makes lots of transport - but the work becomes better documented and traceable. The short texts of transport can I also use to document the little changes I made each have. How versioning has finally made a documentary of a source steps.
only for work on "throwaway prototypes" I do not use transportation, and use local packages. Just so I got my problem. This prototype in development work have quite a high value: they can - as in this case - as a Proof Of Concept justify the award of a development project.
for developments in JavaScript, Perl, C / C + + and Java, I often use the editor UltraEdit
. This it does allow you to create automatically numbered backups of recent changes. This setting is flat, then applies to each File that I change the editor at all. I prefer to be able to toast the versioning targeted themselves. Furthermore, I do not like the waste, save each of these versions as a full version (rather than the differences). So I've
UltraEdit equipped with a versioning tool based on CVS (CVS is a bit out of fashion, but certainly "well hung"). Who does not like CVS, but rather works with GIT or SVN can modify my solution slightly, as the command line commands are similar for the checking in and out in all these systems.
How does it work? If I want to draw a version of the current edited file I choose my new tool "versioning":
The versions, their diffs and patches I can see me afterwards with a GUI to CVS, for example
TortoiseCVS or WinCVS
.
the sake of completeness I would add to the batch file that performs the versioning. It gets two arguments of Ultraedit, the directory name and file name (in the tool command by the symbols% and designated p% n% e). The definition of the tool is so
makeVersion.bat "% p"% n% e
The batch file must remove it with its medieval string processing these quotes to use the name and path in their own commands to be. It then establishes a temporary working directory, the file checked out of the same name from a local repository, copies the current status in the working directory and then leads the
commit from
. Documentation on the changes with the
-m parameters but no thanks. Because I'm doing so only to micro versions - the much smaller version that arise while working on a program. For the same reason, its enough to perform the versioning only by file name. If I had worked many months ago before a different file of the same name, disturb me by that time the present version not: I look so not-so far I am concerned with changes over a period of minutes or hours. In my IDE of the future all these things in the integrated editor. For troubleshooting I might be a time line available, restored in the even with the simultaneous work on multiple files, the last consistent code stands test half a can, so I can determine directly, without extensive analysis, from which change has the slight error crept.
@ ECHO OFF rem
<: Parser {
SYNTAX: rem make
version
rem the specified versioned files whereby for each file name
things, a new module root directory ue32work angelegt wird.
set CVSWORKDIR=\UltraEdit-32\cvswork
set WTEMP=\Temp
set UE32WORK=%WTEMP%\ue32work
set CVSCMD=\cvsnt\cvs -d %CVSWORKDIR%
set FILEPATH=%1%
for /f "useback tokens=*" %%a in ('%FILEPATH%') do set FILEPATH=%%~a
set FILENAME=%2%
for /f "useback tokens=*" %%a in ('%FILENAME%') do set FILENAME=%%~a
set FULLFILENAME="%FILEPATH%%FILENAME%"
rmdir /S /Q %UE32WORK%
mkdir %UE32WORK%
if exist %CVSWORKDIR%\ue32work\%FILENAME% (
@ECHO ON cd %WTEMP% %CVSCMD% co ue32work\%FILENAME%
copy / Y% FULL FILE NAME%% UE32WORK% \\% FILENAME% cd% UE32WORK% \\% FILENAME% % CVSCMD commit% m "dummy"% FILENAME% ) else ( @ ECHO ON mkdir% UE32WORK% \\% FILE NAME% copy / Y% FULL FILE NAME%% UE32WORK% \\% FILENAME% cd% UE32WORK% \\% FILENAME% % CVSCMD import% m "dummy" ue32work \\% FILENAME% "UE32WORK" "r1"
)
[1] Why was I only almost a data loss victim? Thanks to my colleague had a crazy chance a version of the file in their browser cache, after all, was only half an hour old. That was enough.
0 comments:
Post a Comment