Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: preventing a sub-dir updating?

My repo has one dir containing some very large files, every time those get changed it wastes a few minutes of my day when I update... they're not files I need.

Perhaps ideally they'd be in their own repo, but that's not an option to me... is there a way I can make SVN not include that dir when I update the whole working dir, but wtill allow me to manually update that sub-dir if I want to every week or so?

Preferably using Tortoise rather than command-line...

ps: I tried using ignore but it for some reason seemed to delete the sub-dir... though that might be me doing it wrong.

like image 266
Mr. Boy Avatar asked Feb 28 '23 08:02

Mr. Boy


2 Answers

Subversion 1.6 added a new feature, called Spare Directory Exclusion (which is even better than the --depth from 1.5), as you can directly specifiy, which directory you don't want to update in one single command.

svn update --set-depth=exclude www

Examples to be found in the blog.

I really don't know how this would work in Tortoise (and I assume that it's not possible).

like image 146
Marcel Jackwerth Avatar answered Mar 07 '23 12:03

Marcel Jackwerth


Yes, you can using Subversion's new (version 1.5) --depth feature. You can do it like this:

  • Check out your project root directory with --depth immediates
  • For all directories except the one you want to exclude, check out those directories with no --depth option (or equivalently, --depth infinity)

Subversion will remember your depth preferences so when you do an update from the project root directory, the directory you omitted (with the large files) will be skipped.

TortoiseSVN also supports the checkout depth from within the GUI.

Note also that although a version 1.5 or later Subversion client will support the above options, in order to work efficiently the server must also be updated to version 1.5 or later. Otherwise, since the server doesn't understand the --depth request, the client will ask for everything and filter out the updates on the client side. Obviously this wouldn't solve your problem of updates taking too long.

like image 30
Greg Hewgill Avatar answered Mar 07 '23 11:03

Greg Hewgill