.svnignore ignored by Subversion when doing: "svn copy"

151 Views Asked by At

I have the following (Windows command) Subversion script:

svn propset svn:ignore --recursive -F .svnignore .

echo Ignoring files with the following filename patterns:
svn propget svn:ignore

svn copy %sourceUrl% %destUrl%

This is what I get running it:

property 'svn:ignore' set on '.'
property 'svn:ignore' set on '1'
property 'svn:ignore' set on '1\A'
property 'svn:ignore' set on '1\B'
property 'svn:ignore' set on '2'
...
Ignoring files with the following filename patterns:

TempDir
*.o
*.obj

Committing transaction...
Committed revision 79.

The copy operation is successful, however the files that should have been ignored have been copied, too.

The .svnignore file has been picked correctly, as shown in the output. What am I missing?

1

There are 1 best solutions below

5
Lazy Badger On
  1. Please, re-read relevant SVN Book fully and understand

    • purpose,
    • usage
    • limitation

of svn:ignore property

For convenience and speed, I'll quote the most important parts in the topic, but the full understanding of all details from your side is still required

P. 1

When found on a versioned directory, the svn:ignore property is expected to contain a list of newline-delimited file patterns that Subversion should use to determine ignorable objects in that same directory.

and I can't predict directory of your %sourceUrl%

P. 2

(most important and applicable in your case)

Subversion's support for ignorable file patterns extends only to the one-time process of adding unversioned files and directories to version control. Once an object is under Subversion's control, the ignore pattern mechanisms no longer apply to it. In other words, don't expect Subversion to avoid committing changes you've made to a versioned file simply because that file's name matches an ignore pattern — Subversion always notices all of its versioned objects.