views:

335

answers:

6

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.

+1  A: 

In your shoes, I'd use a DVCS (such as Mercurial) and the tools that come with it to interoperate smoothly with svn, see e.g. http://www.selenic.com/mercurial/wiki/WorkingWithSubversion .

Alex Martelli
I second this.The advantage is, that you have version control features, even without a connection to the server. This is called Distributed Version control. Then a simple command like 'push' or similar throws your changes into svn. This really works great!
AndreasT
+6  A: 

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.

TheVillageIdiot
I think I'll probably try this. I'll mark it as an answer on Monday, if it works.
Program.X
A: 

You can use RealYou to checkout the project to a different location in your case, to the USB drive. Then you can work on it at home and commit the changes from the USB drive when you're back at Monday.

You don't need a seperate user for this.

Vitaly Polonetsky
A: 

You can just export your project (same fs structure without .svn subfolders) and working offline. When back to work just copy over your dev path and then commit.

Could use a simple vpn (using openvpn to do what you are asking for) to work from home without having to carry with you your project. This allow full scm functionalities (commit, reverts, history, etc..) and is right way for me.

Andrea Balducci
I previously used a VPN at a previous employer. Worked great. This option is not available to me here, though :(. Thanks for your help.
Program.X
+1  A: 

i think you might be interesting in SVK

svk is a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools.

you can find a blog post describing the use and workflow here

solomongaby
+2  A: 

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.

Bert Huijben
Wow. Noted. I'm gonna have to get me another USB drive, then.
Program.X