R – svn – Remote, Disconnected Working

svntortoisesvn

We use svn and I am going to start working from home. I had the idea of bringing in my laptop, checking out the project and taking it home, returning and reversing the process on Monday.

But it's a bulky laptop and I don't fancy riding to work with it on my back.

Would it be possible instead to:

  1. Create a second Windows/SVN user "MeRemote"
  2. Check out the project to another location under "MeRemote"
  3. Copy those files to a USB disk
  4. Take disk home, work on files "locally"
  5. Return on Monday, copying over "MeRemote" checked out project
  6. "MeRemote" commits changes to repo
  7. "RealMe" updates changes.

This way, everything is logged and stamped for when I am working in the office/home, I don't have to lug my heavy laptop around and source control remains consistent.

Is this the correct way to do this? Just checking before I enter another world of SVN pain.

We're using SVN, VisualSVN Server, Visual SVN client and TortoiseSVN.

Best Answer

The easy way

This is the normal process to work with SVN:

  1. You can download project on your thumb drive directly, by doing checkout on your thumb drive.
  2. Take the thumb drive with you and work on it from anywhere (e.g. your laptop at home).
  3. When you return to work with your thumb drive you can update the code and then commit it all into the repository.

When you update the changes using your work login it will show who changed and checked in the files. The only hassle you'll have is to fix merge conflicts that may appear.

Need local commits?

If you have the need to make local commits on your thumb drive alone, you can achieve this by creating a new svn repository on your thumb drive. However you will need to copy files between the repository on your thumb drive and to the repository at work.

You can also do local commits by using distributed version control as pointed out by Alex Martelli, this is done by cloning the repository to your thumb drive and then sync it back to svn.