Skip navigation

Monotone howto

Monotone is a distributed version control system with tightly integrated cryptographic integrity and authenticity checks. This howto is not meant to be an exhaustive set of documentation on monotone (see their huge set of manuals and wiki for that), but merely a means to bootstrap Syndie developers.

Tracking Syndie development

If your primary goal is to pull the latest development code, there is little to no setup required:

  1. Install monotone
  2. Create a monotone database:
    mtn db init --db=./syndie.mtn
  3. Create a monotone nym:
    mtn genkey arbitrary@name
  4. Pull the latest code into your monotone database:
    mtn --db=./syndie.mtn pull mtn.i2p.net "syndie"
  5. Check out the latest code from your monotone database into a new "workspace"
    mtn --db=./syndie.mtn checkout --branch=syndie
  6. You're good to go! The code is now in ./syndie/

Whenever you want to pull any more changes, run step 4 again, and then go into your monotone workspace (./syndie/) and run mtn update

If you have any changes you want to make to the main Syndie branch, you can bundle them up with mtn diff - mail that to a Syndie developer or the syndie-commit mailing list at i2p.net. The changes will be reviewed and applied and then pushed onto the mtn.i2p.net repository for everyone to access. Over time, if you want commit priviledges on the mtn.i2p.net repository, that can be arranged - see below for more details.

Contributing to Syndie development

If you will be contributing to the codebase repeatedly, it may become simpler to just get commit priviledges on the mtn.i2p.net repository directly. If you feel you need this:

  1. Create a long lasting monotone nym for development, using a valid email address:
    mtn genkey jrandom@i2p.net
  2. Create a transient monotone nym for synchronizing with the repository:
    mtn genkey jrandom-transport@i2p.net
  3. Make sure your commits will be signed by the long lasting nym:
    cat >> ~/.monotone/monotonerc
    function get_branch_key (branchname)
      return "jrandom@i2p.net"
    end
    ^D
  4. You can have monotone remember the passphrases to those passwords as well:
    cat >> ~/.monotone/monotonerc
    function get_passphrase (keypair_id)
      if ("jrandom@i2p.net" == keypair_id) then
        return "the_author_passphrase"
      elseif ("jrandom-transport@i2p.net" == keypair_id) then
        return "the_transport_passphrase"
      else
        return false
      end
    end
    ^D
  5. Send both public keys to jrandom@i2p.net so that they can be authorized
    mtn pubkey jrandom@i2p.net > keys.txt ; mtn pubkey jrandom-transport@i2p.net >> keys.txt

Once the keys are authorized, the long lasting nym will be added to the mtn-committers file, and the transient nym will be granted write permission to the mtn.i2p.net repository.

Monotone development cheatsheet: