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

Re: "svn add * --force" and global-ignores / svn:ignore property

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2005-12-31 15:13:24 CET

On Dec 31, 2005, at 01:14, Mailing List wrote:

> It would be nice if someone could see if the following are bugs,
> _features_ or if I'm missing something... seems weird to me...
> 1 - global-ignores rules which don't begin with a period (.) don't
> seem to be applied at the root level of the working directory on
> "svn add * --force".
> 2 - svn:ignore properties are ignored on "svn add * --force" (if
> global-ignores rules are (normally) applied with --force why
> svn:ignore properties aren't?).

I think you misunderstand how ignores are designed to work...

If you have a directory "foo" containing files "bar" and "baz" and
you've specified that files called "bar" are supposed to be ignored,
then "svn st" ignores "bar":

$ cd /tmp
$ svnadmin create repo
$ svn co file:///tmp/repo wc
Checked out revision 0.
$ cd wc
$ svn mkdir foo
A foo
$ svn ci -m "adding foo"
Adding foo

Committed revision 1.
$ touch foo/bar
$ touch foo/baz
$ svn st
? foo/bar <-- bar is shown
? foo/baz
$ svn propset svn:ignore bar foo <-- ignore bar
property 'svn:ignore' set on 'foo'
$ svn st
? foo/baz <-- bar is no longer shown
M foo

But if you say "svn add foo/bar" then "bar" *will* be added, because
you explicitly told Subversion to.

So when you say "svn add *" you're explicitly telling Subversion to
add every file in the current directory, and Subversion will do so,
even if those items were in one of your ignore lists.

I do not know what your use of "--force" is doing here; I have no
experience with that option.

Note that your shell expands "*" to all items whose names do not
begin with "." which explains why you didn't perceive a problem with
items beginning with ".".

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Dec 31 15:14:42 2005

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