[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] TMerge lint/cleanup/refactor

From: Will Dean <svn_at_indcomp.co.uk>
Date: 2004-12-20 01:09:04 CET


The attached patch is a bit of a tidy of some of the TMerge code,
particularly concentrating on the BEAST of a class CDiffData.

I found the use of !sFilename.IsEmpty() all over the place to mean 'are we
using this file' very confusing (too many double negatives for my feeble
brain), so I did something about that, which lead me into hoisting all the
code which deals with the filenames and descriptive names (sXXXFile and
sXXXName) out into another class called CWorkerFile.

This gets rid of lots of duplicated filename manipulation code in
MainFrm.cpp, and I hope rather cleans things up.

I have taken the two-way and three-way code diff-building code out of the
CDiffData Load function into separate functions.

I would like to move to making these three:

        CFileTextLines m_arBaseFile;
        CFileTextLines m_arTheirFile;
        CFileTextLines m_arYourFile;

local to CDiffData::Load, because their data is not used after the loading
and diffing is complete, and it would save memory not to have redundant
copies of files loaded. However, they're used outside the class to copy
file-type props across to a saved file, so this still needs a bit of work.

Anyway, I hope none of the changes offend anyone! Chuck them away if they do.

I have not left the .vcproj changes in the patch-file, so whoever commits
this (Stefan, who else...?) will need to add CWorkerFile.cpp/.h to the project.



To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org

Received on Mon Dec 20 01:11:34 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.