Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Lets say I have 100+ files that I've checked out. Is there a way I can add all of them to a changelist without specifying them one by one, or adding them to file?

share|improve this question
Can you clarify your question a bit? I'm not sure what you are looking to achieve. Thanks. – gabe. Mar 25 '11 at 19:52

2 Answers 2

Was operating system are you using?

I'm going to assume Linux. Try something like this:

ls *.c *.h */*.c */*.h | xargs svn cl source

This will add all C and header files in the current and immediate subdirectories to the changelist source. The above command may have trouble with whitespace in filenames. For something more sophisticated, try this on for size:

find . -name .svn -type d -prune -o -type f -print0 | xargs -0 svn cl source

This will add all normal files not located under .svn directories to the changelist source. This also works with whitespace in filenames.

share|improve this answer
That first command could be simply written svn cl source *.c *.h */*.c */*.h! Don't parse the output of ls, and it's not as if you were getting any use out of it. – Gilles Mar 31 '11 at 20:29
Of course, that's much better than my first example. I was just trying to provide in-between a simple svn command a and a find, pipe, xargs, svn command, but I guess I didn't go far enough. – penguin359 Mar 31 '11 at 21:03
@Amir so, have you decided on a final answer? – penguin359 Apr 4 '11 at 22:21

You are not really clear about what you want: you say that you checked 100+ files out, but you want to add them to the repository. I'll go over both adding files already in a workspace and committing modifications in a workspace.

To add a directory tree to an already checked out working copy, use svn add --force . which will add all the unversioned files in your working copy starting at the current directory (even though the current directory is versioned). The added files will still need to be committed to the repository.

To commit modifications, you can run svn commit -m "*insert comment here* . which will commit all the changes in the working copy from the current directory down to the repository.

share|improve this answer
I just want to add a bunch of files to a changelist. – Amir Afghani Mar 25 '11 at 0:26
A change-list is the set of files in a revision record in the repository, this is read-only. You cannot modify a record after the fact in Subversion. If you are asking to commit all modified files, then you would commit based on the top of the tree. – Arcege Mar 26 '11 at 1:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.