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

Re: Feature request: a way to exclude some extension from commit

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-05-12 19:50:59 CEST

Hi Roberto,

First, thanks for your patch. But I have a few concerns about the concept.

Roberto Paterlini wrote:
> Usually when I do a commit I don't want to include some file like
> *.csproj or *.config because they contains changes made from VS o from
> the programmers that don't need to be released.

*.csproj and *config files contain not just user data but affect the
whole build process. If you miss committing such changes, you could
break the build for others.

I don't really see why you want to exclude those from commits regularly.
I mean if you just want them excluded some times, you wouldn't need to
add the exclude list.

Maybe using a branch for your work would be a better approach for your
situation?

> I have modified Dialog2 in setting to let the user add a list like
> '*.csproj *.config *.log4net' to the Tortoise configuration.

Versioning a log file? What's the reason for that?

> The Commit Dialog leave files with the specified extension unchecked if
> they have entry->status == svn_wc_status_modified, otherwise they are
> checked as usual.
>
> The patch in the attachment is based on revision 9381 from trunk.

The patch looks good with some small issues:

  ····PUSHBUTTON······"Restore·Default",IDC_RESTORE,200,196,93,14 END
-IDD_SETTINGSMISC·DIALOGEX·0,·0,·300,·217
+IDD_SETTINGSMISC·DIALOGEX·0,·0,·300,·238
STYLE·DS_SETFONT·|·DS_FIXEDSYS·|·WS_CHILD·|·WS_DISABLED·|·WS_CAPTION
CAPTION·"Look·and·Feel::Dialogs·2"

You've resized the dialog here. That's not good. All the dialogs
(they're actually property pages) must have the same size, otherwise the
whole settings dialog will look ugly because the biggest page will
determine the size of the whole dialog. Which means now all the other
pages will look a little odd because they're size won't match.

 
void·CSVNStatusListCtrl::Show(DWORD·dwShow,·DWORD·dwCheck·/*=0*/,·bool·bShowFolders·/*·=·true·*/)
  { » Locker·lock(m_critSec); »
WORD·langID·=·(WORD)CRegStdWORD(_T("Software\\TortoiseSVN\\LanguageID"),·GetUserDefaultLangID());

CString·ext·=·CRegString(_T("Software\\TortoiseSVN\\ExcludedExtensions"),·_T(""));
+» std::vector<CString>·arExts; +» int·iStart=0; +» while(true) +» { +»
» CString·s·=·ext.Tokenize(·_T("·"),·iStart·); +» »
if·(·s.IsEmpty()·)·break; +» » arExts.push_back(s); +» } +»

Here, you're tokenizing the exclude list on every Show() call. It would
be much better to tokenize that when the control is created and then
re-used when needed.

But I'm not even sure we should really do this. Having files excluded
from a commit by default is a bad idea, because it leads to not-so-good
working style. And once that's implemented, people will start excluding
other stuff which shouldn't be versioned in the first place.
And we'll get a lot of "BUG:!!!" reports every time they try to commit a
removed folder. Because that's only possible with a recursive commit,
which means *everything* will have to be committed then.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat May 12 19:51:11 2007

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