質問

I have an SVN controlled PCB library that I use at work and at home. Files are checked out on my office workstation.

To be able to work at home, I need the same files also checked out on an external HDD which I connect to the office workstation for synchronization and use on my private PC (without SVN installed - no connection to company SVN-server wanted).

I tried just making a double checkout which gave me dozens of conflicts where (imo) there shouldn't be any.

I'm not sure what synchronization means.

I can't just work on the external HDD all the time because the office workstation may also be used by someone else than me - when I and my external HDD are not around.

How do I checkout two local copies of same repository?

役に立ちましたか?

解決

You can checkout two local copies of same repository:

svn checkout file:///var/svn/repos/test mine1

then

svn checkout file:///var/svn/repos/test mine2

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.checkout.html

他のヒント

When you leave the office, copy the whole working copy folder from your company's PC to your external HDD every time you leave the office and want to work at home. If you do any changes at home, you commit the changes from the external HDD when you are in the office again. Than you do "update" on your working copy located at the company's PC. This way you always have a functional working copy on your PC at the company and you can work at home.

There are two solutions:

  1. You can simply checkout into a new folder on your external HD. That way, you can work in that second location just like in the first one. Just be careful not to confuse the checkouts and never forget to commit both or you'll end up in merge hell.

  2. You can use a DCVS like Mercurial to create a decentralized copy. Mercurial knows how to talk to Subversion and it can create stand-alone repositories.

Using the second approach, you can create a Mercurial repository on your external hard disk. When using push/pull, it will talk to the upstream Subversion repo. But you can take the disk home, clone the repository onto your private PC (or work in the copy on the external hard disk).

This has the additional advantage that Mercurial allows you to commit your work even when not connected to any network - Mercurial saves the commit info in the repository until you tell it to push the changes to Subversion.

For an introduction to Mercurial, look here: http://hginit.com/

There are several ways how you can connect Mercurial and Subversion, see here for a list with pros/cons: https://www.mercurial-scm.org/wiki/WorkingWithSubversion

If I understand the problem correctly.. you could use Dropbox for this.

Checkout the respository into a dropbox folder, then all the files will be synced with dropbox. You can then setup Dropbox on your home and work PC and you can access your files at work or at home.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top