edit remote files with Xcode?

Falcor
Unregistered
 
Post: #1
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
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #2
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/
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #3
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
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #4
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
You could also make an SMB or NFS share on the linux box. The Mac can mount either read/write.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #6
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.
Quote this message in a reply
Falcor
Unregistered
 
Post: #7
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 aloneSad)
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #8
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.

Falcor Wrote: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)
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  C++ with SDL2 Framework: Loading .bmp files in same folder in XCode 5 on Mavericks exitcode 1 827 Feb 23, 2014 11:15 PM
Last Post: SethWillits
  Why won't Xcode even try compiling my .cpp files?? SparkyNZ 11 13,386 Apr 3, 2011 01:44 PM
Last Post: AnotherJake
  Newbie problem XCode Include files BBBert 1 4,260 Mar 17, 2008 03:46 PM
Last Post: OneSadCookie
  .C cplusplus files in XCode? kelvin 2 3,911 Mar 27, 2007 04:18 PM
Last Post: OneSadCookie
  Recompiling header files in Xcode scgames 7 6,386 Jun 30, 2006 07:39 PM
Last Post: ravuya