As the other person noted with the find command I use svn status
. Used as thus
>svn status
? private/Config.my.php
? private/log/word_failure
? private/log/db_err_log.txt
? private/import/client2
M public/reports/ReadyForMeeting.report.php
? public/tools/Connection.class.php.good
M public/tools/FieldNode.class.php
M public/tools/PageBuilderForm.class.php
M public/domain/Report_Setup_Parameter.class.php
M public/domain/Report_Setup_Page.class.php
M public/modules/mAdmin/mManageUsers.module.php
M public/modules/mAdmin.module.php
M public/modules/mAppraiserSetup.module.php
? public/js/firebug-lite.js
? public/js/lang_en-us.js
? public/js/_composite.js
? public/js/lang_en.js
M public/js/uniValidate.js
Ahh see all those with a status of ? that means that they are in the filesystem but not committed. Therefore, I add all php files like thus.
> svn status | grep ^\? | awk '{ print $2 }' | grep .*php$ | xargs svn add
Or If I wanted to add php python and js files this would work
> svn status | grep ^\? | awk '{ print $2 }' | egrep ".*php$|.*py$|.*js$" | xargs svn add
'svn status' would then be the best answer to me. This way only what HAS NOT been added to the repo will be selected.
Just as often though, what I do is just go through and delete what I do not want in the repo (why is it there anyways) and
then I execute, thus getting all helper images and such.
> svn status | grep ^\? | awk '{ print $2 }' | xargs svn add
Find is a good solution too, this just requires less thinking. And is also not nearly as greedy. Plus if you're on windows then some variation of this would work. Namely take the output of svn status and hack up a short batch file.
Good Luck!