Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Important cleanup and foundation for snapshot
- Loading branch information
Sebastien Pierre
committed
Sep 30, 2009
1 parent
5105074
commit 78df128
Showing
9 changed files
with
236 additions
and
590 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
== Sink | ||
== Swiss army knife for directory comparison and synchronization | ||
-- Author: Sébastien Pierre <sebastien@type-z.org> | ||
-- Revision: 1.0.0 (29-Sep-2009) | ||
|
||
|
||
Use cases | ||
========= | ||
|
||
Changes mode | ||
============ | ||
|
||
Linking mode ('-l' options) | ||
=========================== | ||
|
||
Sink's '-l' mode comes in handy when you'd like to use symlinks but you can't | ||
(because you put your files under revision control, etc). | ||
|
||
Let's put this in context: let's say you're just began working on a new Web application | ||
('mywebapp') and that you start by using a couple of files ('reset.css', | ||
'base.css', 'sidebarlayout.css') from your 'mycsslibs' project. | ||
|
||
You'll probably simply copy the files to 'mywebapp', but if you update them in | ||
'mywebapp' you'll have to propagate back the changes to 'mycsslib', and you | ||
might forget to do so. | ||
|
||
You might also just create symlinks instead of copying the files -- but your SCM | ||
system is likely to consider the file as a symlink, so your 'mywebapp' will | ||
depend on having 'mycsslibs' installed at the right location. | ||
|
||
Using Sink '-l' mode you can have most of the advantages of symlinks, while | ||
making it easy to propagate and merge back changes. | ||
|
||
Let's take a tour of the options, assuming 'mywebapp' and 'mycsslibs' are | ||
located in the '~/Projects' directory: | ||
|
||
First we'll create a Sink link database: | ||
|
||
> cd ~/Projects/mywebapp ; sink -l init | ||
|
||
we then create the links to the css files we want to borrow from 'mycsslibs': | ||
|
||
> sink -l add ~/Projects/mycsslib/base.css . | ||
> sink -l add ~/Projects/mycsslib/mycsslibs.css . | ||
> sink -l add ~/Projects/mycsslib/sidebarlayout.css . | ||
|
||
now you can check the status of your links (did you do local changes, did the | ||
original file changed ?) | ||
|
||
> sink -l status | ||
|
||
you can pull changes from the source (meaning updating the 'mywebapp' CSS files | ||
according to the 'mycsslibs' files) | ||
|
||
> sink -l pull | ||
|
||
or push your local changes to the source (meaning updating the 'mycsslibs' CSS files | ||
according to the 'mywebapp' local version) | ||
|
||
> sink -l push | ||
|
||
# EOF - vim: ts=2 sw=2 textwidth=80 et syn=kiwi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.