[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-05 22:04:53 CET

Tim Moloney wrote:
> Michael Price wrote:
>
> > Well, I'm only a release manager and not a developer but I'm -1 on
> > having add check svn:ignore.
> >
> > If I type 'svn add baz' then I want baz added regardless of whether or
> > not its being "ignored". Ignores shouldn't override explicitly added
> > files.
> >
> > Now, as for the globbing issue, this is often handled by the shell. So
> > if there are files foo.xyz and bar.xyz in a directory then 'svn add
> > *.xyz' will be expanded to 'svn add bar.xyz foo.xyz' by your
> > shell. Subversion will see two explicitly named files and it should add
> > both regardless of the current ignore property.
> >
> > I know what I'm doing. The commands I'm running shouldn't second guess
> > me.

You may know what you're doing. But many other people don't. If you
could add a file by specifiying it manually but not when it was
specified in a glob, then I'd say great. But since you can't, see below...

> >
> > Michael
>
> This seems inconsistent to me. Either Subversion ignores files in
> svn:ignore or it doesn't. I don't think it should be based on the
> subcommand. If you can say that svn:ignore is only used when a
> subcommand is recursive, then it's consistent (but I think less
> intuitive).
>
> cmpilato@collab.net wrote:
>
>> Yeah, 'svn add' should not bother with svn:ignore. 'svn add -R'
>> should, though (IMHO), but should also recognize the --no-ignores
>> parameter. 'svn import' should behave the same way.
>
>
> If we are going to use flags, it seems more intuitive to me to always
> honor svn:ignore unless some flag (--force?) is used.

I have to weigh in strongly in support of this. Presumably you have
files being ignored in svn:ignore for a reason. If you really want to
override that, you can easily specify --force.

> Example:
> bash> ls
> my_file1.c my_file2.c vendor_lib.o
> my_file1.o my_file2.o
> bash> svn add *
> Added my_file1.c
> Added my_file2.c
> bash> svn add --force vendor_lib.o
>
> I suspect that people are going to use globbing more often than they
> want to override svn:ignore.

Absolutely.

>
> The preceding is based on my understanding of svn:ignore which could
> be 100% wrong since I've never used it. Since I haven't used it yet,
> I'm only arguing for consistency and intuitiveness.

If someone set svn:ignore they presumably have some level of knowledge
about svn and the build system they are using. If someone wants to
check in something that matches svn:ignore, either they are making a
mistake (most likely in my development team :) or they have a good
technical reason to do so and are probably technically savvy enough to
figure out the --force flag.

If we don't honour svn:ignore by default, I'm going to spend my time
removing generated files that other developers have checked in by
mistake even though I set up svn:ignore properly.

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 Wed Mar 5 22:07:49 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.