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