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

Re: svn:ignore property ignored while adding files

From: Julian Fitzell <julian_at_beta4.com>
Date: 2003-03-06 17:46:15 CET

Branko ÄŒibej wrote:
> Julian Fitzell wrote:
>
>
>>I have to weigh in strongly in support of this. Presumably you have
>>files being ignored in svn:ignore for a reason.
>
>
> The reason for "svn:ignore" is to keep certain files out of the "?"
> output of svn status, and only marginally to help svn import and
> recursive svn add. And that's it.
>
> Extending this to have svn ignore files that were explicitly passed it
> on the command line (either via shell globbing or explicitly) it, if
> you'll excuse the harsh words, total nonsense. It would be different if
> Subversion did its own globbing, so that you could write

There is nothing inherent in either the name or the naturally assumed
functionality of svn:ignore that indicates that it only affects svn
status. While you many know this and I may know this, many new users won't.

There are several issues here:

1) When you do a status and see that foo and bar are the only files in
your directory that haven't been added then when you do an svn add and
get foo~ and bar~ added as well you will be surprised.

2) I *want* to be able to do "svn add *" because I am almost always
going to want to add all the files in my working directory except for
those that I have chosen to ignore. We could add another command to do
this but why bother... see 3 below...

3) What is the most common case here? I would suggest that 95% (at
least) of the time, when adding files, you do not want to add files that
match svn:ignore. Why cater to the 5% of the time when you do by making
you remove files that you (or other users - we've been through the fact
that you can't choose your coworkers before) have added? The only files
I have ever added that match a .cvsignore are files called .cvsignore,
and if I had to specify --force in that case (maybe once or twice per
project lifetime) that really wouldn't kill me.

>
> svn add '*'
>
> (note the quotes to disable shell globbing); in that case, I agree that
> the use case is similar to the recursive add one.
>
> But arguing that "svn add *" should do nothing if "*" happens to be in
> your svn:ignore property, so that people who don't know the difference
> between the shell and subversion aren't surprised -- well, tough. Get
> other people who *do* know the difference, or give them shells that
> don't do globbing.

Don't worry about the distinction between globbing and not. We don't
add directories called .svn, we give a warning if you try to use a
versioned file as a log message, there are plenty of cases where we
don't necessarily to exactly what the command line told us until we get
a --force flag. That's the point of the force flag. It says "I know
what the hell I'm doing even though it looks like I don't". And if
you're adding a file that you previously said should be ignored then it
sure as hell *looks* like you don't know what you're doing.

Hell, if people are convinced that they *always* know exactly what
they're doing, how about we have the equivalent of .cvsrc and they can
specify --force as a default flag (wonder how many users would really do
such a thing??).

Julian

-- 
julian@beta4.com
Beta4 Productions (http://www.beta4.com)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 6 17:49:18 2003

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

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