import
[web.mtrack] / defaults / help / bin / Init
1 = bin/init.php =
2
3 This script is used to initialize a new mtrack instance.  If you want to modify
4 an existing mtrack instance, you should try to use the administration
5 interface, or use [help:bin/Modify bin/modify.php] instead as ''init.php'' will
6 exit when you attempt to use it on an already initialized mtrack instance.
7
8 == Synopsis ==
9
10 {{{
11 % cd $MTRACK
12 % php bin/init.php ...parameters...
13 }}}
14
15 == Parameters ==
16
17 === --disable-index === #disable-index
18
19 Disables full-text index generation during setup (affects Trac import).
20
21 === --repo !{name} !{type} !{repopath} === #repo
22
23 Defines a source repository named !{name} of type !{type} that can be found on
24 the local filesystem at !{repopath}.
25
26 Supported repository types are ''hg'' for Mercurial and ''svn'' for Subversion.
27
28 You will typically also want to use {{{--link}}} to associate the repository to
29 a project.
30
31 === --link !{project} !{repo} !{location} === #link
32
33 Defines a link between the project identified by short name !{project} and the
34 repository named !{name} by the source location identified by the regex
35 !{location}.
36
37 To associate the entire repository with a project you would use a simple
38 {{{/}}} as the !{location} parameter:
39
40 {{{
41 % php bin/init.php --repo myrepo svn /path/to/repo \
42         --link myproject myrepo /
43 }}}
44
45 To have changes made under "trunk/docs" be associated with the doc project, and all others be associated with myproject:
46
47 {{{
48 % php bin/init.php --repo myrepo svn /path/to/repo \
49         --link myproject myrepo / \
50         --link doc myrepo /trunk/docs/
51 }}}
52
53 === --trac !{project} !{tracenv} === #trac
54
55 Imports data from a the trac environment on the local filesystem at !{tracenv}, and associate it with the project named !{project}.
56
57 !{tracenv} is the same environment path that you would use when running the
58 trac admin command line utility.
59
60 mtrack can only be used to import SQLite based Trac instances at this time.
61
62 You may import multiple trac environments; the first one will be imported in
63 as-is, but subsequent trac environments will be imported with some changes to
64 avoid the possibility of collisions between ticket numbers and wiki pages.
65
66 Subsequent trac imports will prefix ticket numbers with the project name, so
67 instead of {{{#123}}}, if you import it to a project named {{{mc}}}, the ticket
68 will be {{{#mc123}}}.  Similarly, the wiki pages will be adjusted to live under
69 a directory named after the project, so you would end up with
70 {{{mc/WikiStart}}} for the main wiki page from that trac instance.
71
72 The import will skip Trac wiki pages that contain Trac specific docs (even if
73 you modified them in your trac instance); mtrack prefers to keep its own
74 documentation out of your wiki history so that it doesn't clutter up what is
75 important to you, and also updates automatically when you update mtrack.
76
77 Another note about the wiki import is that mtrack stores wiki pages in a
78 repository.  If you used hierarchical wiki page names (in other words, have the
79 {{{/}}} character in the page names) these are mapped to directories in the
80 repository.  If you created a page named {{{Foo}}} and a page named
81 {{{Foo/Bar}}} you have a collision between the {{{Foo}}} page and the directory
82 named {{{Foo}}} that contains the page named {{{Bar}}}.  The import resolves
83 this collision by renaming the {{{Foo}}} page to {{{FooPage}}}.
84
85 === --vardir !{dir} === #vardir
86
87 Where to store the database, attachments and search engine state.
88
89 If not specified, defaults to a directory named {{{var}}} in the mtrack
90 directory.
91
92 This location, whether specified explicitly or not, will be created if it does
93 not already exist.
94
95 === --config-file !{filename} === #config-file
96
97 Where to create the configuration file.
98
99 If not specified, defaults to {{{config.ini}}} in the mtrack directory.
100
101 === --author-alias !{filename} === #author-alias
102
103 where to find an authors file that maps usernames.  This is used to initialize
104 the canonicalizations used by the system.  The format is a file of the form:
105
106 {{{
107 sourcename=canonicalname
108 }}}
109
110 The import will replace all instances of sourcename with canonicalname in the
111 history, and will record the mapping so that future items will respect it.
112
113 You do not need to use this option if you have only a single repository, or if
114 you have never changed usernames for any of your contributors.
115
116 === --author-info !{filename} === #author-info
117
118 Where to find a file that will be used to initialize the userinfo table. The
119 format is:
120
121 {{{
122 canonid,fullname,email,active,timezone
123 }}}
124
125 where canonid is the canonical username.
126
127 for example:
128
129 {{{
130 wez,Wez Furlong,wez.spam@netevil.org,1,EST
131 }}}
132
133 The ''active'' flag indicates whether the account is eligible to be assigned as
134 a responsible user when changing tickets.
135
136