During my development time, I constantly need to only commit partial of all my changes in the current project directory and leave the rest of files untouched in order to fix some problems. Every time I do a “svn diff” or “svn commit”, I will have to specify the list of files that have changes in order to view diff or commit them. Luckily subversion comes with a handy feature that helps you in this senario.
Subversion’s changelist support allows you to create changelists by applying labels to files you want to be associated with that changelist, remove those labels, and limit the scope of the files on which its subcommands operate to only those bearing a particular label. To use this feature, simply issue the following commands:
$ svn changelist minor-fixes file-1.php file-2.php Path 'file-1.php' is now a member of changelist 'minor-fixes'. Path 'file-2.php' is now a member of changelist 'minor-fixes'.
Then “svn status” will tell you the changes:
$ svn status --- Changelist 'minor-fixes': M file-1.php M file-2.php $
To see diff:
$ svn diff --changelist minor-fixes
And when you commit, can you apply the same options:
$ svn ci -m "Fix minor bug and leave the rest un-touched" \ --changelist minor-fixes
Then you can continue working with the rest of the files in the current project.