View Full Version : edit remote files with Xcode?
Falcor
2005.07.09, 03:24 AM
Hello, I could really use some help. Sorry if this has been discussed before, my searches turned up nothing.
I'm working on a project that only runs only runs on linux right now, so I'm ssh'ing into the server to modify code and compile it. But running xemacs can be really slow through ssh. Is there a way to use Xcode locally to edit the remote files and save them remotely? I know in windows once I used visual studio ( yeah I know speak of the devil ) on remote files by opening them through explorer or whatever the windows finder is called, and it worked fine. I've tried this with ftp on my mac, but all the ftp drives seem to be read only and don't comply with permission changes.
Any help is greatly appreciated,
thanks
Andrew
2005.07.09, 04:55 AM
one slick way is to set up a version control server like subversion or CVS. The current version of Xcode supports both. You "checkout" the project directory of the project you're working on from a remote machine. Then, you edit the files locally, compile, debug, etc. Then you "commit" your changes back to the remote machine. There are tons of other reasons why it's a good idea to use version control software beside the whole remote editing thing. The two main versions control choices are CVS (old, but very popular) and Subversion (aka SVN... newer and offers lots of improvements over CVS). Check out this subversion book: http://svnbook.red-bean.com/
Andrew
2005.07.09, 05:05 AM
also, if you just want to copy files back and forth, use scp. Here the basic syntax:
scp remoteUser@remoteHost:someDir/someFile.c somePathOnYourLocalMachine/
or
scp someFile.c remoteUser@remoteHost:someDir/someFile.c
and you can use -r to copy entire directories
see the man pages for details
aarku
2005.07.09, 07:13 AM
It's not Xcode, but I do this with SubEthaEdit and Fugu all the time. With Fugu, you SFTP into the remote machine and click the Edit button. When you have SubEthaEdit selected as the editor, it'll automatically open it with the remote file. Save in SEE and Fugu uploads the changes.
SEE is a better editor than Xcode anyways. ;-)
-Jon
OneSadCookie
2005.07.09, 07:28 AM
You could also make an SMB or NFS share on the linux box. The Mac can mount either read/write.
Skorche
2005.07.09, 02:59 PM
If you're just editing single files, I'd choose a different editor. I'll second SubEthaEdit, very delicious. I also seem to remember an editor that I tried once with built in FTP support, TextMate maybe? Didn't like the editor as much as SEE though.
The SEE command line utility also lets you open/save files from pipes, so maybe you could get curl to work if you are more comfortable on the command line.
Falcor
2005.07.09, 08:42 PM
SEE seems like exactly what I wanted, thanks. I guess I never noticed the edit icon in Fugu. It would be nice if the finder's mounted ftp drives supported this but oh well. I was thinking about CVS, but the code I'm working on isn't part of the CVS yet, and I don't have privilages to set up CVS on the server, though I could ask the guy that runs it I suppose. Typing in commit file (I forget the syntax) every time I want to submit a change so I can compile it also seems a bit tedious (though maybe I don't know cvs well enough).
Thanks for your help!
BTW - is there something like SEE that will let you edit things over a network with windows/linux users? The group editing features sound very interesting for my senior design project (hopefully a game if my design proposal is accepted) (only about 1 other mac user that's a senior... so alone:()
Andrew
2005.07.09, 10:20 PM
I'm fairly sure that if you use Xcode to interface with a CVS or Subversion server, you don't need to type in the command. You just select "Commit Changes" from Xcodes's SCM menu.
Typing in commit file (I forget the syntax) every time I want to submit a change so I can compile it also seems a bit tedious (though maybe I don't know cvs well enough)
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.