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

RE: Issue with file name case on adding files

From: Will Wilson <willw_at_fireflyworlds.com>
Date: 2006-06-26 16:25:15 CEST

> > I've just been going through the code
> > (CSVNStatusListCtrl::BuildStatistics) that does the case fix for
> > names. On looking at the add dialog code I realize that this same
> > algorithm is run as per the commit dialog. So to clarify; this works
> > as expected on folders (file name case is converted), just not when
> > you select the file(s) directly (file name case is not converted &
> you
> > can continue the add). I hope this helps narrow down the cause...
> I've noticed that too (well, *after* opening an issue for it).
> The reason we don't fix those when you select the files directly for
> add is that by selecting something explicitly, we must assume that
> is really what the user wanted to do (hey, if you really, absolutely
> want to shoot yourself in the foot, we don't have the right to stop
> you).

It's a reasonable point, although I'd very much like it if there was
some dialog to the effect of "You are about to shoot yourself in the
foot. Are you sure this is what you want do?". Basically, if they really
want to do it, by all means let them, just make sure that you give them
fair warning first.

Additionally, a lot of the artists I work with tend to operate on a file
basis & not a directory basis when doing commits - thus you have a
recipe for disaster (as I've found to my cost).

> Also, you have to understand here that there's always some edge cases
> where TSVN can't fix this problem. That's why you should install a
> commit hook script to not let such things get committed in the first
> place.
> http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/case-
> insensitive.py

Very true, thanks for the link also; it's a useful last line of defence.
However, it'd be preferable to repair the issue up front as I'd imagine
that it's far more useful to most people to fix the problem before the
commit proceeds. Even with problematic edge cases I think it's still an
issue worthy of an automated (but informative) WC fix where possible.

What are the edge cases by the way?

> > PS. Any views on the tsvn:enforceextcase suggestion in my previous
> post?
> > I might try implementing it myself but would like some feedback
> first!
> I have to think about that a little longer. My first impression is
> we shouldn't do it (but as I said: let me think some more about it).
> Even though I'm all in favor of helping users to do the right thing
> correct whatever went wrong, I already know of two edge cases where we
> simply can't correct this. And the problems that occur if you set the
> property and *then* TSVN tries to 'fix' the case of filenames...

If the conversion were only to occur during the add file process then
surely this shouldn't be too much of an issue? I agree that doing it to
files already in the repository is only asking for trouble. What were
the other two edge cases?
> Ok, that's all for today - preparing to watch the game Switzerland
> against South Korea. It doesn't happen too often that Switzerland is
> even part of these big games :)

Good luck against Ukraine! I guess you're going to be quiet tonight as
well then ;)


To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Jun 26 16:26:07 2006

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.