From 04a6f75e5c212b47961b7d6a706a2c03cd8a186f Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 13 Apr 2012 14:50:35 +0530 Subject: [PATCH] (doc updates, mostly migration) - migration and non-core reachable from master-toc now - migration flow changed. install.mkd, migration section, is [migr] now, drives the whole thing now, links to g2migr - more details on how to wipe out old gitolite plus some minor fixes --- doc/g3-master-toc.mm | 11 ++++++- doc/install.mkd | 68 +++++++++++++++++++++++++++++++++++--------- doc/migr.mkd | 6 ---- doc/non-core.mkd | 13 +++++++-- 4 files changed, 75 insertions(+), 23 deletions(-) delete mode 100644 doc/migr.mkd diff --git a/doc/g3-master-toc.mm b/doc/g3-master-toc.mm index 10becc5..3e1b569 100755 --- a/doc/g3-master-toc.mm +++ b/doc/g3-master-toc.mm @@ -30,7 +30,7 @@ - + @@ -129,6 +129,15 @@ + + + + + + + + + diff --git a/doc/install.mkd b/doc/install.mkd index d412782..4aef457 100644 --- a/doc/install.mkd +++ b/doc/install.mkd @@ -2,7 +2,7 @@ **NOTE**: if you're migrating from g2, there are some settings that MUST be dealt with **before** running `gitolite setup`; please -read the [g2 migration][g2migr] page and linked pages. +start [here][migr]. RTFM is *mandatory* for migrations. ## notes and naming conventions @@ -132,24 +132,64 @@ Creating a symlink doesn't need a separate program but 'install' also runs * The `Gitolite` directory can also be there, or it can be anywhere in perl's `@INC` path. -## migrating +## #migr migrating -There are a lot of migration hints and notes; see links at the top of this -document. +If you're migrating from gitosis, [this][gsmigr] is what +you want to start with. -But here's the **bottom line** on migrating: nothing in any of the gitolite -install/setup/etc will ever touch the *data* in any repository except the -gitolite-admin repo. The only thing it will normally touch is the `update` -hook. +First things first: g2 will be supported for a good long time for critical +bugs, although enhancements and new features won't happen. -So one fool-proof way of "migrating" from any older gitolite is this: +If you're an existing (gitolite v1.x or v2.x) user, and wish to migrate , here +are the steps: -1. Wipe out the old gitolite, but **carefully** +### pre-migration - * clone `~/repositories/gitolite-admin.git` to someplace, then delete it - (and only it, none of the other repos!) from `~/repositories` - * rename `~/.gitolite.rc` to something else - * move the ~/.gitolite/logs` directory somewhere else, then delete `~/.gitolite` +1. Check the [dev-status][] page to make sure all the features you want have + been implemented in g3. + +2. Read the [g2 migration][g2migr] page to see what changes affect you and + your users, and how much time it might take you to migrate. (The closer + you were to a default install of the old gitolite, the less time a + migration will take.) + +### migration + +**Note**: nothing in any of the gitolite install/setup/etc will ever touch the +*data* in any repository except the gitolite-admin repo. The only thing it +will normally touch in normal repos is the `update` hook. + +1. Carefully wipe out the old gitolite + + * the **code** + + * delete or move away all the old gitolite scripts. Check the path + to the gl-auth-command in `~/.ssh/authorized_keys` if you forgot + where you put them. + + * delete or move away the two directories named in the two variables + `GL_PACKAGE_CONF` and `GL_PACKAGE_HOOKS` in `~/.gitolite.rc` + + * the **rc file** + + * rename `~/.gitolite.rc` to something else + + * the **admin repo** + + * clone `~/repositories/gitolite-admin.git` to someplace safe + * then delete `~/repositories/gitolite-admin.git` + + (make sure you do not delete any other repos!) + + * the **admin directory** + + * if you need to preserve logs, move the ~/.gitolite/logs` directory + somewhere else + + * if you added any custom hooks and wish to preserve them, move the + ~/.gitolite/hooks` directory somewhere else + + * delete `~/.gitolite` 2. Read about [presetting][rc-preset] the rc file; if you're using any variables listed as requiring preset, follow those instructions to create diff --git a/doc/migr.mkd b/doc/migr.mkd deleted file mode 100644 index 857f484..0000000 --- a/doc/migr.mkd +++ /dev/null @@ -1,6 +0,0 @@ -# migrating to gitolite - -If you're an existing (gitolite v1.x or v2.x) user, start with the [g2 -migration][g2migr] page. - -If you're migrating from gitosis, [this][gsmigr] is what you want. diff --git a/doc/non-core.mkd b/doc/non-core.mkd index 2ac0491..8a3a636 100644 --- a/doc/non-core.mkd +++ b/doc/non-core.mkd @@ -1,5 +1,11 @@ # non-core programs shipped with gitolite +---- + +[[TOC]] + +---- + ## commands A list of these commands can be obtained by running `gitolite help` on the @@ -82,7 +88,7 @@ VREFs have their [own page][vref]. ## special cases -### #partial-copy partial-copy +### #partial-copy partial-copy: selective read control for branches Git (and therefore gitolite) cannot do selective read control -- allowing someone to read branch A but not branch B. It's the entire repo or nothing. @@ -92,7 +98,10 @@ because they have their own git stack (and their own sshd, and so on) all in one big Java program. Gerrit is *really* useful if you want code review to be part of the access control decision] -Gitolite can now help you do this, as follows: +Gitolite can now help you do this. Note that this is only for branches; you +can't do this for files and directories. + +Here's how: 1. enable 'partial-copy' in the `PRE_GIT` section in the rc file.