Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn - Remote, Disconnected Working

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.

like image 526
Program.X Avatar asked Dec 22 '22 11:12

Program.X


2 Answers

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.

like image 95
5 revs, 2 users 83% Avatar answered Dec 31 '22 01:12

5 revs, 2 users 83%


Subversion assumes that filestamps have at least a 1 second precision to check if files have changed but the FAT filesystem on most USB drives supports only 2 second precision. Theoretically it can miss changes in your files in the first second after updating, committing, etc. etc.

I would recommend formatting your USB drive as NTFS to resolve this issue.

like image 24
Bert Huijben Avatar answered Dec 31 '22 00:12

Bert Huijben