Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set svn:ignore with multiple values?

Tags:

svn

Let's say I want to set the svn:ignore property for directory dir1 with multiple values, file1, file2, and file3. How can I do this via command line, without using a text editor (to set the property value)?

like image 464
Snowcore Avatar asked Jun 16 '11 08:06

Snowcore


People also ask

How do I set property to ignore in svn?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

How do I ignore bin and obj folder in svn?

You could add bin folder to ignore list. Right click on the bin folder -> TortoiseSVN -> Unversion and add to ignore list -> bin.

How do I delete a file from svn?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…


3 Answers

Type exactly like here with line breaks:

svn propset svn:ignore "file1
file2
file3" dir1

If you want to pass a list from another command, try xargs. Unfortunately, the svn command doesn't allow reading from stdin with -F -.

like image 107
gertas Avatar answered Sep 29 '22 13:09

gertas


One line solution:

svn propset svn:ignore "file1"$'\n'"file2"$'\n'"file3" dir1
like image 39
Jan.J Avatar answered Sep 29 '22 14:09

Jan.J


Adding multiple entries is much easier. Use the following command:

svn propedit svn:ignore .

This will open a text editor. Now you can add multiple entries easily.

like image 25
SMR Avatar answered Sep 29 '22 13:09

SMR