From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Re: Suggest changing git repo on website to refer to git protocol Date: Thu, 24 Jul 2008 12:27:09 +0200 Message-ID: <87myk737cy.fsf@kassiopeya.MSHEIMNETZ> References: <4886168E.5080908@manor-farm.org> <8C7E273F-8690-4A16-9172-BB6C9A3545B0@uva.nl> <6dbd4d000807221035t2c3271a0h6296f56255a60dab@mail.gmail.com> <6dbd4d000807221301q7896e920g287e0500efd92f80@mail.gmail.com> <873am1cpae.fsf@gollum.intra.norang.ca> <7bef1f890807230711y6e49b53emfd9027304d870a5c@mail.gmail.com> <7bef1f890807230919m388dfb36r7ea7ddab1ea354ba@mail.gmail.com> <20080723201929.GC11860@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLy1O-0003jD-Tq for emacs-orgmode@gnu.org; Thu, 24 Jul 2008 06:26:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLy1J-0003hJ-3W for emacs-orgmode@gnu.org; Thu, 24 Jul 2008 06:26:06 -0400 Received: from [199.232.76.173] (port=50651 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLy1H-0003gx-PX for emacs-orgmode@gnu.org; Thu, 24 Jul 2008 06:26:00 -0400 Received: from mail.gmx.net ([213.165.64.20]:55249) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KLy1H-0005lJ-OK for emacs-orgmode@gnu.org; Thu, 24 Jul 2008 06:26:00 -0400 In-Reply-To: <20080723201929.GC11860@stats.ox.ac.uk> (Dan Davison's message of "Wed, 23 Jul 2008 21:19:29 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Mailinglist Hi Dan, I know, this is of topic, but I love another software besides Orgmode ;-) Dan Davison writes: > Well I've started reading that pdf, and it looks like it's going to be > a good read... But before I go to far, seeing as we're on this topic, > would someone mind saying a few words about git versus other version > control systems? I know nothing about any of them, but have been > meaning to learn how to version control directories trees containing > e.g. org and source code files. I prefere monotone (mtn) [1], since it has 1. A cleaner user interface 2. Easier setup and usage (e.g. just put the mtn binary in your $PATH on a server and use your online repos via SSH) 3. Better handling of file permissions (when using an FAT formated USB-Stick) 4. _Very_ helpfull error messages on the command line. monotone always guesses what I wanted to do... 5. SQL interface 6. Much, much nicer mailinglist 7. User centric development (UI is one of the most discussed topics on the list) 8. Much better manual 9. Written in C++ (if you want to hack it...) 10. Binaries for most common Systems downloadable on monotone.ca (if you're working on different machines frequently). etc. The only point where git is better is speed. But I don't care about a few seconds (just a lot of small projects here => up to ~257 MB, some more). I don't like to fight with the tools I use - they should just work and help ME. monotone get's you up and running in about 10 minutes. It works for me since three years now without the slightest problem. This is how I use it. You might as well read the first few section in the goood gooood manual [2]: ------------------------------------------------------------ SETUP WORKSPACE AND REPO 1. Download the mtn binary and put it somewhere in $PATH, or just install the Debian package (or what ever distribution you use). 2. Create a key. You need one to work with monotone. See http://monotone.ca/docs/Generating-Keys.html#Generating-Keys for more information. $ mtn genkey user@exmple.com 2. Setup a repository and working directory # Setup a Repo. A repo is a Database (SQLight) outside of your # working directory. $ mtn -d ~/monotone/org.mtn db init # cd to working directory: $ cd ~/notes # This creates the _MTN subdirectory in your workspace. Tell monotone # wich branch you want to work on: $ mtn -d ~/monotone/org.mtn setup -b trunk . # Add everithing in working dir (-R == recursively): $ mtn add -R . # Commit changes to local repo: $ mtn commit -m'initial commit' ------------------------------------------------------------ SYNCHRONIZE TO MACHINES USING AN USB-STICK 1. Copy the repo to my USB-stick $ cp ~/monotone/org.mtn /media/disk 2. Take the stick home and plug it into my laptop. Setup a workingdirectory there $ cp /media/disk/org.mtn ~/monotone $ mtn -d ~/monotone/org.mtn co -b trunk ~/notes Now I have three repos. I could just setup one repo on the stick, but what if I loose the stick? 3. Change something on my laptop and commit the changes $ cd ~/notes $ echo '* new first level heading' >> index.org $ mtn commit -m'new headling in index.org' 4. Synchronize the repo on my laptop with the one on my USB-stick $ mtn sync --set-default file:/media/disk/org.mtn '*' The '--set-default' is to tell my workspace, that the default repo to sync with the one on my stick. In the future I just have to type $ mtn sync 5. Take the stick and apply the changes on my PC $ cd ~/notes $ mtn sync --set-default file:/media/disk/org.mtn '*' $ mtn update Again: the '--set-default' is to tell my workspace, that the default repo to sync with the one on my stick (the asterisk means 'all branches' - could be one or more regexps to just sync some branches). In the future I just have to type $ mtn sync ------------------------------------------------------------ THE _VERY_ SIMPLE SSH VARIANT: 1. Download and install on work station and server. On the server it's sufficient to place a binary in $PATH (e.g. ~/bin/). 2. Copy the local repo to the server: $ scp ~/monotone/org.mtn user@host:/home/user/monotone/ 3. Sync the first time: $ mtn sync --set-default ssh://user@host:/home/user/monotone/org.mtn '*' In the future just use $ mtn sync It's possible to setup a server just like CVS and similar. But I don't use that variant, since it is more complex (as you know). ------------------------------------------------------------ COMMANDS: >From now on I just cd to the appropriate workspace and use the following commands: $ mtn commit # commit changes $ mtn sync # sync repo on disk and the one on USB-stick $ mtn push # Just push from local to remote $ mtn pull # Just pull from remote to local $ mtn update # update the workspace if something new $ mtn revert file[s] # undo changes in my workspace $ mtn mv file dir/file # rename a file (workspace and repo) $ mtn add file # add a file $ mtn rm file # delete a file (workspace and repo) Branching is simple: $ mtn commit -m'message' -b new.branch # creates 'new.branch' $ mtn update -b new.branch # update workspace to 'new.branch' If you use monotone you might be interested in sr-monotone.el [5], which puts ChangeLog entries into the workspace/_MTN/log if found. If not, it calls add-change-log-entry the usual way. This will work even if you followed a symlink to get to your working directory. I think it's merged into the 'official' monotone.el, but I'm not shure (I don't use it). ------------------------------------------------------------ FOOTNOTES: [1] http://monotone.ca - homepage [2] http://monotone.ca/monotone.pdf - The GREAT manual as PDF [3] http://monotone.ca/docs/index.html - ...as HTML [4] http://lists.gnu.org/archive/html/monotone-devel/ - Mailing list archive [5] http://www.emacswiki.org/cgi-bin/emacs/sr-monotone.el -- Sebastian Rose, Hannover, Germany Phone: +49 173 83 93 417 Mail.: sebatian_rose@gmx.de, s.rose@emma-stil.de