emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Re: Suggest changing git repo on website to refer to git protocol
Date: Thu, 24 Jul 2008 12:27:09 +0200	[thread overview]
Message-ID: <87myk737cy.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <20080723201929.GC11860@stats.ox.ac.uk> (Dan Davison's message of "Wed, 23 Jul 2008 21:19:29 +0100")

Hi Dan,

I know, this is of topic, but I love another software besides Orgmode ;-)

Dan Davison <davison@stats.ox.ac.uk> 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

  parent reply	other threads:[~2008-07-24 10:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 16:48 Suggest changing git repo on website to refer to git protocol Denis Bueno
2008-07-22 16:54 ` Carsten Dominik
2008-07-22 17:00   ` Denis Bueno
2008-07-22 17:19   ` Ian Barton
2008-07-22 17:27     ` Carsten Dominik
2008-07-22 17:35       ` Denis Bueno
2008-07-22 17:54         ` Carsten Dominik
2008-07-22 20:01           ` Denis Bueno
2008-07-22 21:00             ` Manish
2008-07-23  2:22               ` Bernt Hansen
     [not found]                 ` <7bef1f890807230711y6e49b53emfd9027304d870a5c@mail.gmail.com>
2008-07-23 16:19                   ` Alan E. Davis
2008-07-23 17:01                     ` Manish
2008-07-23 20:19                       ` Dan Davison
2008-07-24  7:02                         ` Giovanni Ridolfi
2008-07-24 10:27                         ` Sebastian Rose [this message]
2008-07-23 17:31                     ` Carsten Dominik
2008-07-23 20:01                       ` Manish
2008-07-24  1:44                         ` Alan E. Davis
2008-07-24 18:24                         ` Manish
2008-07-24 18:26                           ` Carsten Dominik
2008-07-24 18:40                             ` Manish
2008-07-24 18:58                               ` Carsten Dominik
2008-07-26 11:07                                 ` Bastien
2008-07-26 13:39                                   ` Carsten Dominik
2008-07-25 18:35                               ` Carsten Dominik
2008-07-23 16:44                 ` Manish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87myk737cy.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).