Git Product home page Git Product logo

codesync's Introduction

= CodeSync =

This is a mac utility that uses rsync to immediately synchronize file
changes to a server or remote computer, as you work.

NOTE: Since it uses rsync to communicate with the server, it is important
to setup passwordless public/private keys: http://www.ece.uci.edu/~chou/ssh-key.html

CodeSync uses a project file (see example below) that tells it how to connect to 
the server and which directories to keep in sync.

== PASSWORDS and PUBLIC/PRIVATE KEYS ==
Each time rsync communicates with the server it'll ask for your password, which is
really annoying, unless you setup a passwordless public/private keys.

Follow the instructions at the following URL to be able to sync without passwords:
http://bit.ly/PcTRK 

== INSTALL ==

 * Download the latest version of CodeSync: 
   http://github.com/jgillick/CodeSync/archives/master
 
 * Extract the source code.
 
 * In the source directory run: sudo ./install

== Using CodeSync ==

 * Decide where you want the local project workspace to be. For example: ~/Projects/Work/

 * In your workspace, create a directory for the files: ~/Projects/Work/files/ 

 * Copy the sampleProject file to your Work directory and name it 'project': ~/Projects/Work/project 
  (See 'EXAMPLE PROJECT FILE' section below)

 * Edit the project file:
    + Set the server/username (be sure you have setup your passwordless public/private keys)
    + remote_basedir should be set to the workspace directory on your remote machine.
    + Set local_basedir to '~/Projects/Work/files/'
    + Add the directories you will be working in to the sync_dirs directory.
    
 * Now run the program: codeSync ~/Projects/Work/project 

== EXAMPLE PROJECT FILE ==

   # Server details
   server="remoteserver.com"
   username="johndoe"

   # Base directories to sync from/to
   remote_basedir="/home/johndoe/svn/"
   local_basedir="~/Projects/Work/files/"

   # The directories to sync, relative to the base directories
   sync_dirs=[ "/static/js",
               "/static/css",
               "/gui/jsp" ]
               
   # sync_dirs=[  ] # This will sync the entire base directories

   # The contents of these directories will only sync "up" to the server.
   # This means the contents will never be downloaded from the server
   # but files added or changed locally will be sent to the server
   #
   # sync_up=[ "/static/img" ]
   sync_up=[  ]

== BASE DIRECTORIES vs SYNC DIRECTORIES ==
The base directories are where everything happens on the local and server machines.
If you're working with a large code base you wont want to download and sync ALL the files. 
In this case you define the directories you'll be working on in the sync_dirs array.

If you don't want to download the contents of a directory from the server, but upload any changes 
that are made, you can add those directory paths to the sync_up array.


codesync's People

Contributors

jgillick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

codesync's Issues

Excludes in project file

Right now, it's hard coded (line 160) to use --exclude-cvs which is too restrictive on projects that have a nested tags directory. It should be possible to define the excludes in the project file and have those passed through.

Ref: http://rsync.samba.org/ftp/rsync/rsync.html
matches:

RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .hg/ .bzr/

Really it's just tags and TAGS that complicate things as those can be directory names normally.

Not an 'issue' or 'bug', but another technique to explore

Hi, just wanted to share this with you if you weren't aware of it. If you use an Apache based SVN server, there's a configuration setting you can enable 'autoversioning' as described in http://svnbook.red-bean.com/en/1.7/svn.webdav.autoversioning.html

By default, SVN exposes itself as a WebDAV filesystem which Windows,Linux and OSX all natively support as a 'first-class' filesystem that can be mounted/read/write/unmounted transparently to applications - when you enable autoversioning, any time you save a file it will automatically check it in to SVN.

The only caveat with this method is that Windows and OSX both use tmp files as a standard precaution against nuking files - so when you save a file from an application, it'll open up a tmp file, write it all out, close it and then do an atomic rename to replace the 'real file'. That way there's no chance of losing your content. The result being that your SVN log gets 2 'actions' for every time you save a file, a create and a rename. But, if you're ok with that, and you control the SVN server you're connecting to - it's another way to accomplish the same thing.

Obviously this method vs. your application serve different purposes, and I'm not suggesting that you stop persuing the app. Just wanted to share as it's been a nifty trick I've used in non-standard situations like editing audio fiiles where I wanted to be able to have 'versions' no matter what.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.