What determines the speed of an svn copy
What 开发者_开发知识库factors determine the speed of calling an svn copy
when packaging up a tag from trunk for a release?
I've been using git for the year or two and on a recent project I've had to go back to using subversion, and calling svn copy is taking anything between 2 and 25 minutes to complete on my machine before I commit, without too much correlation to how much code is changing each time.
What steps would you normally take to speed up the packaging process, or at least make it somewhat more predictable?
I know the smart thing would be to use git-svn, but I when I tried I was unable to push to the correct branch, and everyone else on the team is using svn, so I'm wary about adopting an unfamiliar tool halfway through a project.
That depends on whether you perform the svn copy
on the repository or on your disk. The command takes two arguments, source and destination, each of which can be either a folder in a working copy or a URL into the repository.
When target is a local folder, then svn will perform a copy operation in your file system, which might take very long. You then have to commit that copy operation before it shows up in the repository.
However, if target is an URL in the repository, then the copying will happen in the repository immediately (no commit necessary). This is a O(1) operation and should be fast.
If you use this syntax, don't forget to specify a commit message. Also, if you want to actually use the branch/tag you created, you will have to either check it out (which again takes long) or switch your current working copy to it (which should be fast, since there shouldn't be any changes committed to the branch yet).
精彩评论