emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Suggest changing git repo on website to refer to git p


From: Sebastian Rose
Subject: Re: [Orgmode] Re: Suggest changing git repo on website to refer to git protocol
Date: Thu, 24 Jul 2008 12:27:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi Dan,

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

Dan Davison <address@hidden> 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 address@hidden

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 address@hidden:/home/user/monotone/

3. Sync the first time:

   $ mtn sync --set-default ssh://address@hidden:/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.: address@hidden, address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]