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

How to svn ignore multiple directories and files properly ?

From: Z W <mpc8250_at_gmail.com>
Date: Sun, 4 Aug 2013 01:52:48 -0700

Hi All

We read folks posted online and it appears to show conflicting statements
on how to svn ignore multiple directories and files using svn propedit.

Suppose we have the following working copy directory structure.
/projectRoot (this working copy directory contains subdirectories build and
src)
/projectRoot/build.xml
/projectRoot/README.txt
/projectRoot/classes (this directory contains class files)
/projectRoot/build/artifacts/zips (this directory contains zip files)
/projectRoot/build/artifacts/jars (this directory contains jar files)
/projectRoot/src/com/a/b/c (this directory contains java files)

Q1:
Suppose we're at projectRoot directory.
a) How do we put line by line in svn-ignore-list.txt to ignore the
following files and directories ?

We are confused on when to propset svn:ignore if we like to ignore multiple
directories and files in different locations.
b) Do we have to perform multiple propset commands in specific directories
to ignore multiple directories and files (since we read somewhere that we
can only ignore child directories and files) ?
ie
if we're at projectRoot directory, to ignore README.txt, classes directory
and build/artifacts/zips and jars directories we have to

svn -propset svn:ignore -F /path/to/svn-ignore-list.txt . (and then
continuing)
cd /projectRoot/classes
svn -propset svn:ignore -F /path/to/svn-ignore-list.txt . (and then
continuing)
cd /projectRoot/build/artifacts/zips
svn -propset svn:ignore -F /path/to/svn-ignore-list.txt . (and then
continuing)
cd /projectRoot/build/artifacts/jars
svn -propset svn:ignore -F /path/to/svn-ignore-list.txt . (and then
continuing)

c) Is there a single command that would take care of all of that above, if
only we set the list in svn-ignore-list.txt right ?
ie can we have in svn-ignore-list.txt

classes/*.class
README.txt
build/artifacts/jars/*.jars
build/artifacts/zips/*.zips

and then in a single command, in projectRoot directory of working copy
svn -propset svn:ignore -F /path/to/svn-ignore-list.txt .

Thanks in advance for clarification
Sincerely
Received on 2013-08-04 10:53:30 CEST

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