views:

2066

answers:

10

I have a project I need to be working on from two different computers, at work and at home. I need to be able to work on the code from both computers, so the issue is two fold;

  1. Sharing the code
  2. Sharing the workspace.

1 is simple enough with svn; but I feel icky committing broken code to svn just so I can access that again from home. I can live with this but is there a better option?

To elaborate more on 2. I have a highly customized eclipse setup on one of the computers where I spent hours adding plugins and tweaking every tiny config options I could access to get it to the point where it is just right. It'll be a pain redoing every single change on the other computer, is there some way to automatically sync that? I know I can export preferences from Eclipse and import them, but I don't want to have to manually do that each time I change something. [Also, I don't think exporting preferences also exports perspectives?]

Both computers run windows.

A: 

Regarging #1, I've thought about this too. Microsoft's TFS has a "shelve" feature which does what you want (store pending changes on the server without committing). It's kind of like a personal branch.

In subversion I would probably create a branch for my bleeding-edge, maybe-broken code, and just merge to trunk periodically.

Gabe Moothart
A: 

Or simply Remote Desktop into your preferred computer from the other.

Shakedown
A: 

I utilize rsync to do a similar thing between my laptop(OSX) and desktop(linux).

A quick google search mentions rsync is available for windows - so this may be an option for you.

You can probably set this up to be set on a schedule by your OS. I personally have it set up for when I access my office network or when files are changed.

Matt
Hey Matt, sorry missed this comment somehow earlier. I resolved my issue with a combination of using rync to keep updating the server every 5 mins and Eclipse pulse. But your idea of setting it up to copy files only as soon as they're changed is interesting and to me, ideal. Can you let me know how to do that?
Naren
A: 

Eclipse and most other java tools are easily portable.

You can copy the them to a thumb drive and run them on any machine. For the JDK it needs to have a similar OS.

I have a "C:\Development" folder with eclipse, java, jboss, workspace, ant, maven, svn, etc.. which I can unzip and drop in C: on any windows machine and run my environment.

I don't run it off the thumb drive because you never know which letter the drive will get and some of the references eclipse keeps are fully qualified.

Chris Nava
+7  A: 

Portable Development Environment

Not that you'd want to run from a USB flash drive, but you can bundle Eclipse and the JDK all in one directory, as described here, to have a nicely self-contained development environment:

You can toss in a few more tools too if needed:

See PortableApps for additional tools, including one that will put a menu in your system tray giving you quick access to all your portable tools.

Once you've got that set up, then use an option like one of the following to share the directory across workstations:

External Hard Drive

A flash drive would be too slow, but often an external HDD is fine. Of course, you've got to lug it around. And it's no fun when you forget to bring it to work one day--as I did my laptop yesterday. :-) Drive letter changes can be another problem.

Mirroring Tools

A mirroring/backup tool is simple but error-prone. These are one-way tools, in that they copy everything from one workstation to another. The risk is that you make changes at one workstation, forget to run the tool, then change the same file(s) at your other workstation, and run the tool, overwriting your changes.

Synchronization Tools

A step up from a mirroring tool would be a syncronization tool. These detect changes and allow you to make choices about merging. You have to remember to run it manually, or use another tool to schedule it to run at certain times.

Synchronization Services

These are services that automatically sync files between workstations. Most, if not all of them handle conflicts, and allow access to previous versions of files. They are nice because they are set-and-forget. You don't have to remember to run a mirror or sync tool. Also, these eliminate the need to leave one workstation powered up so that you can manually sync to it when you get to the other workstation.

Pete TerMaat
+1 well-researched. I like the idea of using a secondary synchronization strategy to keep the files mirrored.
Gabe Moothart
To solve the quirk with the space in the name, create a link (junction on NT) to a location with an acceptable name.
larelogio
A: 

For True Cross-Platform Sync and Backup between Windows, Mac and Linux - Try out SpiderOak https://spideroak.com - 2GB free online backup, sync and webshare in a 100% secure zero-knowledge environment.

A: 

You might consider using Pulse. Its free and its great for generating a standard Eclipse installation that includs all your plugins and workspace settings (if you use the freelance version - not free). Its nice to be able to generate one working Eclipse configuration and then repeat that same profile installation on another computer OR share that profile with an entire team.

hubbardr
A: 

To followup on this, i've been using Pulse with some success poweredbypulse.com. Its not the ideal solution but it's been working pretty well for me so far.

Naren
A: 

https://spideroak.com has the most complete, secure and reliable sync I have found so far. 100% cross platform and zero-knowledge client side encryption key creation kicks ass!

Dan
+2  A: 

I have just tried out the recently announced workspace mechanics plugin. It seems to be made exactly for the second part of the question.

You will need to provide a directory where the preferences are to be stored (by default ~/.eclipse/mechanic). With the plugin installed, preferences can be easily exported to separate files. If you start a new workspace and point the plugin to the right directory (or leave the default), a dialog is displayed that lets you choose what settings to apply to the current workspace.

Kariem