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

Enforcing: 'propset svn:ignore -R' under 'svn add --force .'

From: Roland <mailinglist-users.subversion.tigris.org_at_krystian.net>
Date: 2006-07-13 00:12:53 CEST

Summary: 'svn add --force .' added files despite 'propset svn:ignore -R'
being set. Perhaps I'm not getting something.

This question has been posted about a week ago online. You may also view
this question online (to view it with formatting, etc)

View topic - Enforcing: 'propset svn:ignore -R' under 'svn add --force .'
http://www.svnforum.org/2017/viewtopic.php?p=4522#4522

Hello,

I'm trying to understand better and leverage the most out of the svn:ignore
property in svn. I've read that svn:ignore, when recurisvely set on
directories through propset, permits files in those directories to not be
included when: svn add --force . is executed. [1]

I've had trouble replicating this. I've found that there was a problem with
the svn add command not ignoring files in directories when svn:ignore was
set recurisively on directories in the past: [2]

I'm using I'm using svn version 1.2.3 (r15833) on debian, similar to what
this author uses: [3] . However,the final thread post doesn't indicate
whether or not our version permits the svn:ignore from restricting svn adds
of files within directories, though it seems likely it our version is upto
date for such functionality ("apt-cache showpkg subversion" indicates this
is the most recent version in the testing distribution).

The following is a log of my input/output (~120 lines) which attempts to
setup similar parameters to the bug report [2] link. I go from the steps of
generating a svn repository all the way to svn:add'ing, witnessing that svn
add added files despite the svn:ignore property being set on directories.

I might be misunderstanding something, so hopefully my log will make things
more evident.

[1] http://forum.textdrive.com/viewtopic.php?id=10038
[2] http://subversion.tigris.org/issues/show_bug.cgi?id=2243
[3] http://www.svnforum.org/2017/viewtopic.php?t=1050

[code]
trivial@localhost:~$ ls -alR directory-with-sample-files/
directory-with-sample-files/:
total 12
drwxr-xr-x 3 trivial trivial 4096 Jul 6 13:58 ./
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:01 ../
-rw-r--r-- 1 trivial trivial 0 Jul 6 13:58 samplefile.c
-rw-r--r-- 1 trivial trivial 0 Jul 6 13:58 samplefile.suo
drwxr-xr-x 2 trivial trivial 4096 Jul 6 13:58 test-subfolder/

directory-with-sample-files/test-subfolder:
total 8
drwxr-xr-x 2 trivial trivial 4096 Jul 6 13:58 ./
drwxr-xr-x 3 trivial trivial 4096 Jul 6 13:58 ../
-rw-r--r-- 1 trivial trivial 0 Jul 6 13:58 samplefile2.c
-rw-r--r-- 1 trivial trivial 0 Jul 6 13:58 samplefile2.suo
trivial@localhost:~$ svn --version
svn, version 1.2.3 (r15833)
   compiled Dec 4 2005, 03:38:36

Copyright (C) 2000-2005 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet
(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

trivial@localhost:~$ svnadmin create ~/source-repository/
trivial@localhost:~$ mkdir test
trivial@localhost:~$ mkdir test/test-subfolder
trivial@localhost:~$ ls -alR test
test:
total 12
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:04 ./
drwxr-xr-x 6 trivial trivial 4096 Jul 6 14:03 ../
drwxr-xr-x 2 trivial trivial 4096 Jul 6 14:04 test-subfolder/

test/test-subfolder:
total 8
drwxr-xr-x 2 trivial trivial 4096 Jul 6 14:04 ./
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:04 ../
trivial@localhost:~$ svn import -m "initial import" test
file:///home/trivial/source-repository/test
Adding test/test-subfolder

Committed revision 1.
trivial@localhost:~$ rm -rf test/
trivial_at_localhost:~$ svn co file:///home/trivial/source-repository/test
A test/test-subfolder
Checked out revision 1.
trivial@localhost:~$ ls -al test/
total 16
drwxr-xr-x 4 trivial trivial 4096 Jul 6 14:05 ./
drwxr-xr-x 6 trivial trivial 4096 Jul 6 14:05 ../
drwxr-xr-x 7 trivial trivial 4096 Jul 6 14:05 .svn/
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:05 test-subfolder/
trivial@localhost:~$ ls -al test/test-subfolder/
total 12
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:05 ./
drwxr-xr-x 4 trivial trivial 4096 Jul 6 14:05 ../
drwxr-xr-x 7 trivial trivial 4096 Jul 6 14:05 .svn/
trivial@localhost:~$ cd test/
trivial@localhost:~/test$ cp -R ../directory-with-sample-files/* .
trivial@localhost:~/test$ ls -al
total 16
drwxr-xr-x 4 trivial trivial 4096 Jul 6 14:06 ./
drwxr-xr-x 6 trivial trivial 4096 Jul 6 14:05 ../
drwxr-xr-x 7 trivial trivial 4096 Jul 6 14:05 .svn/
-rw-r--r-- 1 trivial trivial 0 Jul 6 14:06 samplefile.c
-rw-r--r-- 1 trivial trivial 0 Jul 6 14:06 samplefile.suo
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:06 test-subfolder/
trivial@localhost:~/test$ ls -al test-subfolder/
total 12
drwxr-xr-x 3 trivial trivial 4096 Jul 6 14:06 ./
drwxr-xr-x 4 trivial trivial 4096 Jul 6 14:06 ../
drwxr-xr-x 7 trivial trivial 4096 Jul 6 14:05 .svn/
-rw-r--r-- 1 trivial trivial 0 Jul 6 14:06 samplefile2.c
-rw-r--r-- 1 trivial trivial 0 Jul 6 14:06 samplefile2.suo
trivial@localhost:~/test$ svn status
? samplefile.c
? samplefile.suo
? test-subfolder/samplefile2.c
? test-subfolder/samplefile2.suo
trivial@localhost:~/test$ svn propset svn:ignore -R '*.suo' .
property 'svn:ignore' set (recursively) on '.'
trivial@localhost:~/test$ svn propset svn:ignore -R '*.suo' test-subfolder/
property 'svn:ignore' set (recursively) on 'test-subfolder'
trivial@localhost:~/test$ ls -R
.:
samplefile.c samplefile.suo test-subfolder/

./test-subfolder:
samplefile2.c samplefile2.suo
trivial@localhost:~/test$ svn status
? samplefile.c
 M .
? test-subfolder/samplefile2.c
 M test-subfolder
trivial@localhost:~/test$ svn commit -m "commiting svn:ignore instructions"
Sending .
Sending test-subfolder

Committed revision 2.
trivial@localhost:~/test$ svn status
? samplefile.c
? test-subfolder/samplefile2.c
trivial@localhost:~/test$ svn propget svn:ignore -R .
. - *.suo

test-subfolder - *.suo

trivial@localhost:~/test$ svn status --no-ignore
? samplefile.c
I samplefile.suo
? test-subfolder/samplefile2.c
I test-subfolder/samplefile2.suo
trivial@localhost:~/test$ svn add --force .
A test-subfolder/samplefile2.c
A test-subfolder/samplefile2.suo
A samplefile.c
A samplefile.suo
trivial@localhost:~/test$
[/code]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 13 00:14:01 2006

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

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