[TxMt] projects on remote servers

Eric O'Brien ericob at possibilityengine.com
Wed Feb 15 07:46:08 UTC 2006

One question I have is what you mean when you say you "have to work  
off the server."  If this is a "security" concern, I think you're  
already compromised... when you edit something in a window on your  
machine, there is almost certainly a version of that file on your  
hard drive, regardless of where you opened from (I'm thinking of temp  
files).  If it's not a security concern, is it a version control  

I also can't get a picture in my head of what's actually happening  
when you "open all the files via FTP and then drag them to an empty  
project..."  Have you mounted a remote directory on your desktop to  
do this?

Enough questions.  Here's an approach I stuck together a few days ago  
and it seems to be working.  Maybe it or something similar will work  
for you.  I was inspired by all the talk of rsync, ssh and bundle  
creating.  If you need to open arbitrary files from many different  
remote locations, this probably wouldn't work very well, but for  
editing a fairly stable collection of files that are in one location  
-- a web site, for example ;)  -- I will never feel the need for  
"TextMate over FTP" again!

The simple version:  I edit the files locally (on my hard drive) then  
use rsync to synchronize a remote directory to my local working  
directory.  Yes, this requires that you have the files on your local  
hard drive, but they are there anyway (regardless of how briefly) if  
you "edit by FTP."

Once you set up ssh keys correctly (discussed elsewhere) you can  
avoid entering your password at each connection.

Using rsync frees you of trying to remember which of 30 or 130 files  
you actually changed and should FTP back to the server.  One usually  
gives up and just uploads them all, for safety's sake.  This can take  
a long time.  I find I tend to use my rsync method pretty much like I  
do for a "save" with a single file... except that it "saves,"  
elsewhere, (the changes to) the entire project directory.

The fun part is that I also created a HTML bundle with the required  
rsync command line in it, and now --from within TextMate-- at the  
touch of a key the server files are updated to match my working files.

I have decided to keep the names of any of my TextMate project  
folders and the remote server folders the same.  If I do this  
consistently for every project I work on, I can just use the same  
bundle, if I substitute ${TM_PROJECT_DIRECTORY##*/} in the path where  
the project folder name would be.  (I don't know anything about  
regex... I just happened to find this little bit if info in the  
TextMate documentation!)

Furthermore, my local working project directory is also a subversion  
working directory.  As I'm a "team" of one, and I'm using subversion  
mostly as a "Project-Level Undo" that has a very long history stack.   
It happens that my subversion repository is on the same computer as  
my working copies, but I assume this whole idea would also work fine  
with a remote repository and a group of authors/developers.

rsync has a handy switch (-C, --cvs-exclude) that skips copying of a  
number of files you probably don't want to be synchronizing.  The  
list includes the invisible svn "administrative directory" that's in  
a working copy folder.  Also checked for files to exclude is a file  
named .cvsignore, in your home directory.  The "ignore" file probably  
doesn't exist.  You'd need to create it because you'll probably want  
to add ".DS_Store" to the exclusion list!

(As I'm not really a command-line jockey, I may have made some  
technical errors or just plain errors in thinking about this...  
please clarify or correct, anyone!)


On Feb 14, 2006, at 4:10 PM, minimal.design wrote:

> I looked through the mailing list history and I know the whole FTP  
> integrated thing has been talked about a lot already but hear me out;
> I just started working for this company where I HAVE to work off of  
> the server.  I don't like it, but that's the way it's gonna have to  
> be for now (working on it though ;)
> So I tried to figure out a way to work with project windows off of  
> the server and discovered it was impossible...  What I do now, is  
> open all the files via FTP and then drag them to an empty project  
> and hide all the windows.  It's a major pain but I do it once in  
> the morning and leave it open all day so that's not too bad.
> What I would like to know is if there's a way I could automatize  
> the process, some sort of "add all open windows to empty project"  
> type macro or something along those lines. Not as good as being  
> able to save projects on remote servers, but it would be good  
> enough for now...
> I also read that someone had some kind of Perl/rsynch combo that  
> sort of mimicked the project on server idea, but I couldn't find  
> enough info to get anything working.
> Any help in optimizing a remote type workflow would be greatly  
> appreciated.  Thanks!
> (As a side note, I almost got my boss to switch from BBEdit, but  
> the whole remote project issue blew it.)
> Yann

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060214/9be28b89/attachment.html>

More information about the textmate mailing list