You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Roland <ma...@krystian.net> on 2006/07/12 22:12:53 UTC

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

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@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

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

Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/13/06, Roland <ma...@krystian.net> wrote:
> Summary: 'svn add --force .' added files despite 'propset svn:ignore -R'
> being set. Perhaps I'm not getting something.

svn:ignore is for silencing 'svn status' output, not for preventing
files from being committed. If you want to prevent files from being
committed, you need to write a pre-commit hook and check for illegal
additions/commits on the server side.

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Roland <ma...@krystian.net>.
Hello,

I've posted a response to the thread with the user who also uses the same
version of svn that I am using (debian) so that I can get further
clerification on his experiances.

That link was:
http://www.svnforum.org/2017/viewtopic.php?t=1050

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2006c@ryandesign.com] 
Sent: Wednesday, July 12, 2006 06:32 PM
To: Roland
Cc: users@subversion.tigris.org
Subject: Re: Enforcing: 'propset svn:ignore -R' under 'svn add --force .'


On Jul 13, 2006, at 00:12, Roland wrote:

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

[snip]

> I'm using I'm using svn version 1.2.3 (r15833) on debian, similar to 
> what

[snip]

> [2] http://subversion.tigris.org/issues/show_bug.cgi?id=2243

My reading of that bug shows this to have been fixed in Subversion 1.3.
Please try Subversion 1.3.2.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 13, 2006, at 00:12, Roland wrote:

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

[snip]

> I'm using I'm using svn version 1.2.3 (r15833) on debian, similar  
> to what

[snip]

> [2] http://subversion.tigris.org/issues/show_bug.cgi?id=2243

My reading of that bug shows this to have been fixed in Subversion  
1.3. Please try Subversion 1.3.2.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org