blob: 847777fd172186a9308895b22290b648c1c3eb16 [file] [log] [blame]
Junio C Hamano215a7ad2005-09-07 17:26:23 -07001git-archimport(1)
2=================
Junio C Hamano5077fa92005-09-07 14:08:38 -07003
4NAME
5----
Frederick Eatonc2632792018-09-19 13:12:29 -07006git-archimport - Import a GNU Arch repository into Git
Junio C Hamano5077fa92005-09-07 14:08:38 -07007
8
9SYNOPSIS
10--------
Jonas Fonseca353ce812005-12-31 18:37:15 +010011[verse]
Jean-Noël Avila06ebae02021-10-28 16:21:57 +000012'git archimport' [-h] [-v] [-o] [-a] [-f] [-T] [-D <depth>] [-t <tempdir>]
13 <archive>/<branch>[:<git-branch>]...
Junio C Hamano5077fa92005-09-07 14:08:38 -070014
15DESCRIPTION
16-----------
Frederick Eatonc2632792018-09-19 13:12:29 -070017Imports a project from one or more GNU Arch repositories.
18It will follow branches
Jean-Noël Avila06ebae02021-10-28 16:21:57 +000019and repositories within the namespaces defined by the <archive>/<branch>
Junio C Hamano89438672005-12-29 01:20:06 -080020parameters supplied. If it cannot find the remote branch a merge comes from
Junio C Hamanoa6080a02007-06-07 00:04:01 -070021it will just import it as a regular commit. If it can find it, it will mark it
22as a merge whenever possible (see discussion below).
Junio C Hamano5077fa92005-09-07 14:08:38 -070023
Junio C Hamanoa6080a02007-06-07 00:04:01 -070024The script expects you to provide the key roots where it can start the import
25from an 'initial import' or 'tag' type of Arch commit. It will follow and
26import new branches within the provided roots.
Junio C Hamano5077fa92005-09-07 14:08:38 -070027
Junio C Hamanoa6080a02007-06-07 00:04:01 -070028It expects to be dealing with one project only. If it sees
29branches that have different roots, it will refuse to run. In that case,
Jean-Noël Avila06ebae02021-10-28 16:21:57 +000030edit your <archive>/<branch> parameters to define clearly the scope of the
Junio C Hamanoa6080a02007-06-07 00:04:01 -070031import.
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120032
Thomas Rast0b444cd2010-01-10 00:33:00 +010033'git archimport' uses `tla` extensively in the background to access the
Christian Mederf73ae1f2005-10-05 15:08:26 -070034Arch repository.
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120035Make sure you have a recent version of `tla` available in the path. `tla` must
Thomas Rast0b444cd2010-01-10 00:33:00 +010036know about the repositories you pass to 'git archimport'.
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120037
Thomas Rast0b444cd2010-01-10 00:33:00 +010038For the initial import, 'git archimport' expects to find itself in an empty
Junio C Hamanoa6080a02007-06-07 00:04:01 -070039directory. To follow the development of a project that uses Arch, rerun
Thomas Rast0b444cd2010-01-10 00:33:00 +010040'git archimport' with the same parameters as the initial import to perform
Christian Mederf73ae1f2005-10-05 15:08:26 -070041incremental imports.
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120042
Thomas Rast0b444cd2010-01-10 00:33:00 +010043While 'git archimport' will try to create sensible branch names for the
Thomas Ackermann2de9b712013-01-21 20:17:53 +010044archives that it imports, it is also possible to specify Git branch names
Jean-Noël Avila06ebae02021-10-28 16:21:57 +000045manually. To do so, write a Git branch name after each <archive>/<branch>
Paolo Bonzinid9cb5392007-03-07 10:43:41 +010046parameter, separated by a colon. This way, you can shorten the Arch
Thomas Ackermann2de9b712013-01-21 20:17:53 +010047branch names and convert Arch jargon to Git jargon, for example mapping a
Junio C Hamano28394782010-08-23 14:20:25 -070048"PROJECT{litdd}devo{litdd}VERSION" branch to "master".
Paolo Bonzinid9cb5392007-03-07 10:43:41 +010049
Thomas Ackermann2de9b712013-01-21 20:17:53 +010050Associating multiple Arch branches to one Git branch is possible; the
Paolo Bonzinid9cb5392007-03-07 10:43:41 +010051result will make the most sense only if no commits are made to the first
52branch, after the second branch is created. Still, this is useful to
53convert Arch repositories that had been rotated periodically.
54
55
martin@catalyst.net.nza5c500b2005-09-11 21:26:05 +120056MERGES
57------
Thomas Ackermann2de9b712013-01-21 20:17:53 +010058Patch merge data from Arch is used to mark merges in Git as well. Git
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120059does not care much about tracking patches, and only considers a merge when a
60branch incorporates all the commits since the point they forked. The end result
Thomas Ackermann2de9b712013-01-21 20:17:53 +010061is that Git will have a good idea of how far branches have diverged. So the
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120062import process does lose some patch-trading metadata.
63
Junio C Hamanoa6080a02007-06-07 00:04:01 -070064Fortunately, when you try and merge branches imported from Arch,
Thomas Ackermann2de9b712013-01-21 20:17:53 +010065Git will find a good merge base, and it has a good chance of identifying
Junio C Hamanoa6080a02007-06-07 00:04:01 -070066patches that have been traded out-of-sequence between the branches.
Junio C Hamano5077fa92005-09-07 14:08:38 -070067
68OPTIONS
69-------
Junio C Hamano5077fa92005-09-07 14:08:38 -070070
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120071-h::
72 Display usage.
73
74-v::
Junio C Hamanoa6080a02007-06-07 00:04:01 -070075 Verbose output.
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120076
77-T::
Junio C Hamanoa6080a02007-06-07 00:04:01 -070078 Many tags. Will create a tag for every commit, reflecting the commit
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +120079 name in the Arch repository.
80
Eric Wong42f45702005-12-18 17:23:50 -080081-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 Rast0b444cd2010-01-10 00:33:00 +010088 earlier versions of 'git archimport'. Old-style branch names
Junio C Hamano28394782010-08-23 14:20:25 -070089 were category{litdd}branch, whereas new-style branch names are
90 archive,category{litdd}branch{litdd}version. In both cases, names given
Paolo Bonzinid9cb5392007-03-07 10:43:41 +010091 on the command-line will override the automatically-generated
92 ones.
Eric Wong42f45702005-12-18 17:23:50 -080093
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 King6c0c7042017-04-20 16:34:41 -0400100 Attempt to auto-register archives at `http://mirrors.sourcecontrol.net`
Eric Wong42f45702005-12-18 17:23:50 -0800101 This is particularly useful with the -D option.
102
martin@catalyst.net.nza4c5f9a2005-09-11 21:26:05 +1200103-t <tmpdir>::
104 Override the default tempdir.
105
106
Jean-Noël Avila06ebae02021-10-28 16:21:57 +0000107<archive>/<branch>::
108 <archive>/<branch> identifier in a format that `tla log` understands.
Junio C Hamano5077fa92005-09-07 14:08:38 -0700109
110
Junio C Hamano5077fa92005-09-07 14:08:38 -0700111GIT
112---
Christian Couder9e1f0a82008-06-06 09:07:32 +0200113Part of the linkgit:git[1] suite