Thursday, December 23, 2010

Subversion: How to Commit a Directory Without Committing its Contents

I updated the svn:externals property of my project root directory to pull-in updated code from another project. But, I had local changes that I didn't want to commit. The vanilla svn commit . tried to commit all my changes, not just the property ones. The answer was simple: addition of the --non-recursive (-N) option. This option, however, is deprecated.

It appears that the --depth option is the replacement. The sparse directories section of the SVM manual provides details about possible --depth arguments (which are lacking from the options manual page). Note that the --depth option would also be useful for trimming large sections of a checkout that are rarely/never used.

No comments:

Post a Comment