##// END OF EJS Templates
update output of test-convert
Alexis S. L. Carvalho -
r6148:31d81d47 default
parent child Browse files
Show More
@@ -1,120 +1,132
1 1 hg convert [OPTION]... SOURCE [DEST [MAPFILE]]
2 2
3 3 Convert a foreign SCM repository to a Mercurial one.
4 4
5 5 Accepted source formats:
6 6 - Mercurial
7 7 - CVS
8 8 - Darcs
9 9 - git
10 10 - Subversion
11 11 - GNU Arch
12 12
13 13 Accepted destination formats:
14 14 - Mercurial
15 15 - Subversion (history on branches is not preserved)
16 16
17 17 If no revision is given, all revisions will be converted. Otherwise,
18 18 convert will only import up to the named revision (given in a format
19 19 understood by the source).
20 20
21 21 If no destination directory name is specified, it defaults to the
22 22 basename of the source with '-hg' appended. If the destination
23 23 repository doesn't exist, it will be created.
24 24
25 25 If <MAPFILE> isn't given, it will be put in a default location
26 26 (<dest>/.hg/shamap by default). The <MAPFILE> is a simple text
27 27 file that maps each source commit ID to the destination ID for
28 28 that revision, like so:
29 29 <source ID> <destination ID>
30 30
31 31 If the file doesn't exist, it's automatically created. It's updated
32 32 on each commit copied, so convert-repo can be interrupted and can
33 33 be run repeatedly to copy new commits.
34 34
35 35 The [username mapping] file is a simple text file that maps each source
36 36 commit author to a destination commit author. It is handy for source SCMs
37 37 that use unix logins to identify authors (eg: CVS). One line per author
38 38 mapping and the line format is:
39 39 srcauthor=whatever string you want
40 40
41 41 The filemap is a file that allows filtering and remapping of files
42 42 and directories. Comment lines start with '#'. Each line can
43 43 contain one of the following directives:
44 44
45 45 include path/to/file
46 46
47 47 exclude path/to/file
48 48
49 49 rename from/file to/file
50 50
51 51 The 'include' directive causes a file, or all files under a
52 52 directory, to be included in the destination repository, and the
53 53 exclusion of all other files and dirs not explicitely included.
54 54 The 'exclude' directive causes files or directories to be omitted.
55 55 The 'rename' directive renames a file or directory. To rename from a
56 56 subdirectory into the root of the repository, use '.' as the path to
57 57 rename to.
58 58
59 The splicemap is a file that allows insertion of synthetic
60 history, letting you specify the parents of a revision. This is
61 useful if you want to e.g. give a Subversion merge two parents, or
62 graft two disconnected series of history together. Each entry
63 contains a key, followed by a space, followed by one or two
64 values, separated by spaces. The key is the revision ID in the
65 source revision control system whose parents should be modified
66 (same format as a key in .hg/shamap). The values are the revision
67 IDs (in either the source or destination revision control system)
68 that should be used as the new parents for that node.
69
59 70 Back end options:
60 71
61 72 --config convert.hg.clonebranches=False (boolean)
62 73 hg target: XXX not documented
63 74 --config convert.hg.saverev=True (boolean)
64 75 hg source: allow target to preserve source revision ID
65 76 --config convert.hg.tagsbranch=default (branch name)
66 77 hg target: XXX not documented
67 78 --config convert.hg.usebranchnames=True (boolean)
68 79 hg target: preserve branch names
69 80
70 81 --config convert.svn.branches=branches (directory name)
71 82 svn source: specify the directory containing branches
72 83 --config convert.svn.tags=tags (directory name)
73 84 svn source: specify the directory containing tags
74 85 --config convert.svn.trunk=trunk (directory name)
75 86 svn source: specify the name of the trunk branch
76 87
77 88 options:
78 89
79 90 -A --authors username mapping filename
80 91 -d --dest-type destination repository type
81 92 --filemap remap file names using contents of file
82 93 -r --rev import up to target revision REV
83 94 -s --source-type source repository type
95 --splicemap splice synthesized history into place
84 96 --datesort try to sort changesets by date
85 97
86 98 use "hg -v help convert" to show global options
87 99 adding a
88 100 assuming destination a-hg
89 101 initializing destination a-hg repository
90 102 scanning source...
91 103 sorting...
92 104 converting...
93 105 4 a
94 106 3 b
95 107 2 c
96 108 1 d
97 109 0 e
98 110 pulling from ../a
99 111 searching for changes
100 112 no changes found
101 113 % should fail
102 114 initializing destination bogusfile repository
103 115 abort: cannot create new bundle repository
104 116 % should fail
105 117 abort: Permission denied: bogusdir
106 118 % should succeed
107 119 initializing destination bogusdir repository
108 120 scanning source...
109 121 sorting...
110 122 converting...
111 123 4 a
112 124 3 b
113 125 2 c
114 126 1 d
115 127 0 e
116 128 % test pre and post conversion actions
117 129 run hg source pre-conversion action
118 130 run hg sink pre-conversion action
119 131 run hg sink post-conversion action
120 132 run hg source post-conversion action
General Comments 0
You need to be logged in to leave comments. Login now