I am investigating a way to commit all modified/added files via the command line with Subversion, excluding a provided black list. Is this possible?
If I have, say, 100 files I would like to commit, but interspersed with that list are seven files that I don't want to commit. Is there a way to say "commit all files excluding /path/to/file1.php, /path/to/file2.php, /path/to/file3.php", etc....
For example, I would have to do something like:
svn ci [list all files to commit in here] -m 'my commit message'
However, is there a better way to do it? I can't find anything documented regarding it.
svn list <URL> Lists all the files available in the given URL in the repository without downloading a working copy. svn add <filename> Use this command to add new files or changed files to the commit list. svn commit m “Commit message” Commit the added files using a commit message for better traceability.
Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
svn commit will send any lock tokens that it finds and will release locks on all PATH s committed (recursively) unless --no-unlock is passed. If you begin a commit and Subversion launches your editor to compose the commit message, you can still abort without committing your changes.
There is no option to ignore files on-the-fly on commit. However, there are two approaches you can take:
Use the changelists feature. This can help you create filters for the files that you do want to commit and only commit those. As changelists are created on the developer machine, your filters won't impact the general repository. For example, you can add all the files to a changelist using:
svn changelist to-commit *
And then remove those that you want to ignore:
svn changelist --remove /path/to/file1.php
Only svn add
the files that you are working on, one by one as soon as you start editing one. Any file that has not been svn add
ed to the repository will be ignored on commit. Of course, this comes with the disadvantage that you will be the only developer that will have those files on his machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With