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.
12 % php bin/init.php ...parameters...
17 === --disable-index === #disable-index
19 Disables full-text index generation during setup (affects Trac import).
21 === --repo !{name} !{type} !{repopath} === #repo
23 Defines a source repository named !{name} of type !{type} that can be found on
24 the local filesystem at !{repopath}.
26 Supported repository types are ''hg'' for Mercurial and ''svn'' for Subversion.
28 You will typically also want to use {{{--link}}} to associate the repository to
31 === --link !{project} !{repo} !{location} === #link
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
37 To associate the entire repository with a project you would use a simple
38 {{{/}}} as the !{location} parameter:
41 % php bin/init.php --repo myrepo svn /path/to/repo \
42 --link myproject myrepo /
45 To have changes made under "trunk/docs" be associated with the doc project, and all others be associated with myproject:
48 % php bin/init.php --repo myrepo svn /path/to/repo \
49 --link myproject myrepo / \
50 --link doc myrepo /trunk/docs/
53 === --trac !{project} !{tracenv} === #trac
55 Imports data from a the trac environment on the local filesystem at !{tracenv}, and associate it with the project named !{project}.
57 !{tracenv} is the same environment path that you would use when running the
58 trac admin command line utility.
60 mtrack can only be used to import SQLite based Trac instances at this time.
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.
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.
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.
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}}}.
85 === --vardir !{dir} === #vardir
87 Where to store the database, attachments and search engine state.
89 If not specified, defaults to a directory named {{{var}}} in the mtrack
92 This location, whether specified explicitly or not, will be created if it does
95 === --config-file !{filename} === #config-file
97 Where to create the configuration file.
99 If not specified, defaults to {{{config.ini}}} in the mtrack directory.
101 === --author-alias !{filename} === #author-alias
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:
107 sourcename=canonicalname
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.
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.
116 === --author-info !{filename} === #author-info
118 Where to find a file that will be used to initialize the userinfo table. The
122 canonid,fullname,email,active,timezone
125 where canonid is the canonical username.
130 wez,Wez Furlong,wez.spam@netevil.org,1,EST
133 The ''active'' flag indicates whether the account is eligible to be assigned as
134 a responsible user when changing tickets.