Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1 | git-archimport(1) |
| 2 | ================= |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Frederick Eaton | c263279 | 2018-09-19 13:12:29 -0700 | [diff] [blame] | 6 | git-archimport - Import a GNU Arch repository into Git |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Jonas Fonseca | 353ce81 | 2005-12-31 18:37:15 +0100 | [diff] [blame] | 11 | [verse] |
Jean-Noël Avila | 06ebae0 | 2021-10-28 16:21:57 +0000 | [diff] [blame] | 12 | 'git archimport' [-h] [-v] [-o] [-a] [-f] [-T] [-D <depth>] [-t <tempdir>] |
| 13 | <archive>/<branch>[:<git-branch>]... |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 14 | |
| 15 | DESCRIPTION |
| 16 | ----------- |
Frederick Eaton | c263279 | 2018-09-19 13:12:29 -0700 | [diff] [blame] | 17 | Imports a project from one or more GNU Arch repositories. |
| 18 | It will follow branches |
Jean-Noël Avila | 06ebae0 | 2021-10-28 16:21:57 +0000 | [diff] [blame] | 19 | and repositories within the namespaces defined by the <archive>/<branch> |
Junio C Hamano | 8943867 | 2005-12-29 01:20:06 -0800 | [diff] [blame] | 20 | parameters supplied. If it cannot find the remote branch a merge comes from |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 21 | it will just import it as a regular commit. If it can find it, it will mark it |
| 22 | as a merge whenever possible (see discussion below). |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 23 | |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 24 | The script expects you to provide the key roots where it can start the import |
| 25 | from an 'initial import' or 'tag' type of Arch commit. It will follow and |
| 26 | import new branches within the provided roots. |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 27 | |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 28 | It expects to be dealing with one project only. If it sees |
| 29 | branches that have different roots, it will refuse to run. In that case, |
Jean-Noël Avila | 06ebae0 | 2021-10-28 16:21:57 +0000 | [diff] [blame] | 30 | edit your <archive>/<branch> parameters to define clearly the scope of the |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 31 | import. |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 32 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 33 | 'git archimport' uses `tla` extensively in the background to access the |
Christian Meder | f73ae1f | 2005-10-05 15:08:26 -0700 | [diff] [blame] | 34 | Arch repository. |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 35 | Make sure you have a recent version of `tla` available in the path. `tla` must |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 36 | know about the repositories you pass to 'git archimport'. |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 37 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 38 | For the initial import, 'git archimport' expects to find itself in an empty |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 39 | directory. To follow the development of a project that uses Arch, rerun |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 40 | 'git archimport' with the same parameters as the initial import to perform |
Christian Meder | f73ae1f | 2005-10-05 15:08:26 -0700 | [diff] [blame] | 41 | incremental imports. |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 42 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 43 | While 'git archimport' will try to create sensible branch names for the |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 44 | archives that it imports, it is also possible to specify Git branch names |
Jean-Noël Avila | 06ebae0 | 2021-10-28 16:21:57 +0000 | [diff] [blame] | 45 | manually. To do so, write a Git branch name after each <archive>/<branch> |
Paolo Bonzini | d9cb539 | 2007-03-07 10:43:41 +0100 | [diff] [blame] | 46 | parameter, separated by a colon. This way, you can shorten the Arch |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 47 | branch names and convert Arch jargon to Git jargon, for example mapping a |
Junio C Hamano | 2839478 | 2010-08-23 14:20:25 -0700 | [diff] [blame] | 48 | "PROJECT{litdd}devo{litdd}VERSION" branch to "master". |
Paolo Bonzini | d9cb539 | 2007-03-07 10:43:41 +0100 | [diff] [blame] | 49 | |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 50 | Associating multiple Arch branches to one Git branch is possible; the |
Paolo Bonzini | d9cb539 | 2007-03-07 10:43:41 +0100 | [diff] [blame] | 51 | result will make the most sense only if no commits are made to the first |
| 52 | branch, after the second branch is created. Still, this is useful to |
| 53 | convert Arch repositories that had been rotated periodically. |
| 54 | |
| 55 | |
martin@catalyst.net.nz | a5c500b | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 56 | MERGES |
| 57 | ------ |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 58 | Patch merge data from Arch is used to mark merges in Git as well. Git |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 59 | does not care much about tracking patches, and only considers a merge when a |
| 60 | branch incorporates all the commits since the point they forked. The end result |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 61 | is that Git will have a good idea of how far branches have diverged. So the |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 62 | import process does lose some patch-trading metadata. |
| 63 | |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 64 | Fortunately, when you try and merge branches imported from Arch, |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 65 | Git will find a good merge base, and it has a good chance of identifying |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 66 | patches that have been traded out-of-sequence between the branches. |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 67 | |
| 68 | OPTIONS |
| 69 | ------- |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 70 | |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 71 | -h:: |
| 72 | Display usage. |
| 73 | |
| 74 | -v:: |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 75 | Verbose output. |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 76 | |
| 77 | -T:: |
Junio C Hamano | a6080a0 | 2007-06-07 00:04:01 -0700 | [diff] [blame] | 78 | Many tags. Will create a tag for every commit, reflecting the commit |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 79 | name in the Arch repository. |
| 80 | |
Eric Wong | 42f4570 | 2005-12-18 17:23:50 -0800 | [diff] [blame] | 81 | -f:: |
| 82 | Use the fast patchset import strategy. This can be significantly |
| 83 | faster for large trees, but cannot handle directory renames or |
| 84 | permissions changes. The default strategy is slow and safe. |
| 85 | |
| 86 | -o:: |
| 87 | Use this for compatibility with old-style branch names used by |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 88 | earlier versions of 'git archimport'. Old-style branch names |
Junio C Hamano | 2839478 | 2010-08-23 14:20:25 -0700 | [diff] [blame] | 89 | were category{litdd}branch, whereas new-style branch names are |
| 90 | archive,category{litdd}branch{litdd}version. In both cases, names given |
Paolo Bonzini | d9cb539 | 2007-03-07 10:43:41 +0100 | [diff] [blame] | 91 | on the command-line will override the automatically-generated |
| 92 | ones. |
Eric Wong | 42f4570 | 2005-12-18 17:23:50 -0800 | [diff] [blame] | 93 | |
| 94 | -D <depth>:: |
| 95 | Follow merge ancestry and attempt to import trees that have been |
| 96 | merged from. Specify a depth greater than 1 if patch logs have been |
| 97 | pruned. |
| 98 | |
| 99 | -a:: |
Jeff King | 6c0c704 | 2017-04-20 16:34:41 -0400 | [diff] [blame] | 100 | Attempt to auto-register archives at `http://mirrors.sourcecontrol.net` |
Eric Wong | 42f4570 | 2005-12-18 17:23:50 -0800 | [diff] [blame] | 101 | This is particularly useful with the -D option. |
| 102 | |
martin@catalyst.net.nz | a4c5f9a | 2005-09-11 21:26:05 +1200 | [diff] [blame] | 103 | -t <tmpdir>:: |
| 104 | Override the default tempdir. |
| 105 | |
| 106 | |
Jean-Noël Avila | 06ebae0 | 2021-10-28 16:21:57 +0000 | [diff] [blame] | 107 | <archive>/<branch>:: |
| 108 | <archive>/<branch> identifier in a format that `tla log` understands. |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 109 | |
| 110 | |
Junio C Hamano | 5077fa9 | 2005-09-07 14:08:38 -0700 | [diff] [blame] | 111 | GIT |
| 112 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 113 | Part of the linkgit:git[1] suite |