SVN: one working copy, two repositories?

2019-01-22 13:12发布

I'd like to know how can I set two repositories for my one working copy. I need one repository in my server, so that I can check in/out between two pcs; I need another repository in my local pc, so that I can see the result of diff quickly (my svn server is on a slow shared host)

How can I do that?

8条回答
We Are One
2楼-- · 2019-01-22 14:03

Subversion doesn't use network access for its diff operation. This is one of the great benefits of Subversion over CVS. So I'm not sure why you would be encountering that specific problem.

An alternative is to use Git and specifically git-svn on your local PC. You get a full copy of the entire repository history on your local machine, with the ability to diff and view history locally (along with the many other features Git gives you). Whenever possible, I now use git-svn to access Subversion repositories.

查看更多
何必那么认真
3楼-- · 2019-01-22 14:04

You could try using svk as your local client instead of svn. Svk is a pseudo-distributed version control system using svn repositories.

You would use svk to set up a mirror of the repository, synchronise it, and you can diff to your heart's content, as many revisions back as you like and it is all local.

You could also make a branch of the mirrored repository and use that as your checkout, then your commits are also a local-only operation, and when you're ready with a batch of commits you push them to the remote svn repository (and pull other user's changed back, similar to an svn update command).

Two caveats:

  1. Be prepared to use the command line. There is no TortoiseSVK or other GUI to my knowledge.
  2. I've only used svk on linux. If you're using windows, I'm not sure how good the client is.

Other than that, I second using bazaar, mercurial or git as others have suggested. Bazaar is probably the easiest to use, and has a TortoiseBzr GUI which a collegue of mine says is pretty solid.

Git is the hardest to use. It is like the swiss-army knife that is almost wider than it is long, with all the little gadgets and do-dads in it and hanging off it, with the springs so tight that you occasionally slice a finger open trying to prise a blade out.

查看更多
登录 后发表回答