-
Durham Goode authored
Previously all git remotes were created as "remote/foo". This patch adds a configuration option for deciding what the prefix should be. This is useful if you want the bookmarks to be "origin/foo" like they are in git, or if you're integrating with the remotenames extension and don't want the local remote/foo bookmarks to overlap with the remote foo bookmarks.
Durham Goode authoredPreviously all git remotes were created as "remote/foo". This patch adds a configuration option for deciding what the prefix should be. This is useful if you want the bookmarks to be "origin/foo" like they are in git, or if you're integrating with the remotenames extension and don't want the local remote/foo bookmarks to overlap with the remote foo bookmarks.
test-convert.t 19.65 KiB
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert=
> [convert]
> hg.saverev=False
> EOF
$ hg help convert
hg convert [OPTION]... SOURCE [DEST [REVMAP]]
convert a foreign SCM repository to a Mercurial one.
Accepted source formats [identifiers]:
- Mercurial [hg]
- CVS [cvs]
- Darcs [darcs]
- git [git]
- Subversion [svn]
- Monotone [mtn]
- GNU Arch [gnuarch]
- Bazaar [bzr]
- Perforce [p4]
Accepted destination formats [identifiers]:
- Mercurial [hg]
- Subversion [svn] (history on branches is not preserved)
If no revision is given, all revisions will be converted. Otherwise,
convert will only import up to the named revision (given in a format
understood by the source).
If no destination directory name is specified, it defaults to the basename
of the source with "-hg" appended. If the destination repository doesn't
exist, it will be created.
By default, all sources except Mercurial will use --branchsort. Mercurial
uses --sourcesort to preserve original revision numbers order. Sort modes
have the following effects:
--branchsort convert from parent to child revision when possible, which
means branches are usually converted one after the other.
It generates more compact repositories.
--datesort sort revisions by date. Converted repositories have good-
looking changelogs but are often an order of magnitude
larger than the same ones generated by --branchsort.
--sourcesort try to preserve source revisions order, only supported by
Mercurial sources.
--closesort try to move closed revisions as close as possible to parent
branches, only supported by Mercurial sources.
If "REVMAP" isn't given, it will be put in a default location
("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that
maps each source commit ID to the destination ID for that revision, like
so:
<source ID> <destination ID>
If the file doesn't exist, it's automatically created. It's updated on
each commit copied, so "hg convert" can be interrupted and can be run
repeatedly to copy new commits.
The authormap is a simple text file that maps each source commit author to
a destination commit author. It is handy for source SCMs that use unix
logins to identify authors (e.g.: CVS). One line per author mapping and
the line format is:
source author = destination author
Empty lines and lines starting with a "#" are ignored.