My Life Content

Help: import
Login

Help: import

The "import" command:

Usage: fossil import ?--git? ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?
or: fossil import --svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?

Read interchange format generated by another VCS and use it to construct a new Fossil repository named by the NEW-REPOSITORY argument. If no input file is supplied the interchange format data is read from standard input.

The following formats are currently understood by this command

--git
Import from the git-fast-export file format (default) Options:
--import-marks
FILE Restore marks table from FILE
--export-marks
FILE Save marks table to FILE
--rename-master NAME Renames the master branch to NAME
--use-author
Uses author as the committer
--attribute
"EMAIL USER" Attribute commits to USER instead of Git committer EMAIL address

--svn
Import from the svnadmin-dump file format. The default behaviour (unless overridden by --flat) is to treat 3 folders in the SVN root as special, following the common layout of SVN repositories. These are (by default) trunk/, branches/ and tags/. The SVN --deltas format is supported but not required. Options:
--trunk FOLDER
Name of trunk folder
--branches FOLDER
Name of branches folder
--tags FOLDER
Name of tags folder
--base PATH
Path to project root in repository
--flat
The whole dump is a single branch
--rev-tags
Tag each revision, implied by -i
--no-rev-tags
Disables tagging effect of -i
--rename-rev PAT
Rev tag names, default "svn-rev-%"
--ignore-tree DIR
Ignores subtree rooted at DIR

Common Options:

-i|--incremental
Allow importing into an existing repository
-f|--force
Overwrite repository if already exists
-q|--quiet
Omit progress output
--no-rebuild
Skip the "rebuilding metadata" step
--no-vacuum
Skip the final VACUUM of the database file
--rename-trunk NAME
Use NAME as name of imported trunk branch
--rename-branch PAT
Rename all branch names using PAT pattern
--rename-tag PAT
Rename all tag names using PAT pattern
-A|--admin-user NAME Use NAME for the admin user

The --incremental option allows an existing repository to be extended with new content. The --rename-* options may be useful to avoid name conflicts when using the --incremental option. The --admin-user option is ignored if --incremental is specified.

The argument to --rename-* contains one "%" character to be replaced with the original name. For example, "--rename-tag svn-%-tag" renames the tag called "release" to "svn-release-tag".

--ignore-tree is useful for importing Subversion repositories which move branches to subdirectories of "branches/deleted" instead of deleting them. It can be supplied multiple times if necessary.

The --attribute option takes a quoted string argument comprised of a Git committer email and the username to be attributed to corresponding check-ins in the Fossil repository. This option can be repeated. For example, --attribute "drh@sqlite.org drh" --attribute "xyz@abc.net X". Attributions are persisted to the repository so that subsequent 'fossil git export' operations attribute Fossil commits to corresponding 'Git Committer <git@committer.com>' users, and incremental imports with 'fossil import --git --incremental' use previous --attribute records.

See also: export