0

I need to keep a certain svn folder inside a mounted boxcryptor directory that is located inside a dropbox folder. Is that a good idea?

I think the .svn folders keep growing in size and I don't want to waste dropbox space and network bandwidth for that. I only want to keep the working directory there without the .svn folders. Is there a way to do that? Or any other fixes?

Jus12
  • 17,824
  • 28
  • 99
  • 157
  • Why do you store the working copy in dropbox? Any special reason for that? I'd never store a SVN WC in dropbox. – bahrep Aug 15 '12 at 10:40
  • The code is already on dropbox and I want to reuse that directory as the working directory. I use dropbox to sync code between two laptops. I dont want to use SVN for sharing code between my own laptops but only for sharing with other people. I guess this would mean that I need the .svn folders as well. – Jus12 Aug 15 '12 at 10:43

2 Answers2

2

Generally, I can't see a problem with using DropBox as the location for your working copy. (I'm using it for some bibliography files which I'm syncing between different devices for myself, but which are also in our svn for other people to use and modify)

You won't get around the .svn folders in there though, otherwise you won't be able to use svn with that code. I can't think of any way to have the files in there without .svn folders but still use it as a working copy (e.g. svn export would just dump a copy of the code, but it wouldn't be under version control.)

Edit: A similar question (regarding space saving) has been posted previously: "Subversion and DropBox"

Community
  • 1
  • 1
papercutexit
  • 333
  • 2
  • 6
2

I use Dropbox to store my Subversion Repository!

I find it a convenient place. I can run svnserve on my various computers. As long as I am the only one accessing the repository, and I only do it from one computer at a time, it's okay.

The same can be said about the working directory you've checked out. As long as only one user is accessing it at a time, there probably isn't an issue. However, the truth is I might have fewer issues keeping the entire repository in Dropbox than you having a working directory.

There is no guarantee that one Dropbox client is compatible with another. That is, there is no guarantee that a working directory by one Subversion client can be used by another. This has been especially true with the major changes introduced in Subversion 1.7. However, if you use the same client on each machine, or find two clients that are compatible, you shouldn't have any issues.

Of course, the whole idea of version control is to give you the ability to have the same files in multiple places, so there's really little reason to share a working directory. The only advantage would be doing changes at work, then running home and continuing without having to do a commit in between.

Your concern is the size of the .svn directories. You can do an svn export to the directory. That won't include the .svn directory, but it also won't allow you to modify and commit your changes back into Subversion. And, you won't be able to use commands such as svn log.

Subversion uses the .svn directories to connect your working copy with the repository. In versions before 1.7, Subversion would store a copy of the entire checkout. That would allow you to do svn diff without having to ping the repository. I'm not 100% sure of the layout of Subversion 1.7's working directory layout.

David W.
  • 105,218
  • 39
  • 216
  • 337