53 or put into ~/.hgrc: |
53 or put into ~/.hgrc: |
54 |
54 |
55 [defaults] |
55 [defaults] |
56 log = -f |
56 log = -f |
57 |
57 |
58 * Publishing config. |
58 * Publishing repo. |
|
59 |
|
60 With static HTTP hosting you can copy via rsync, ftp, scp, etc., so long as all the files beneath |
|
61 .hg are copied. Also since 1.1 pull protocol can detect static HTTP hosting: |
|
62 |
|
63 $ hg clone http://example.com/project |
|
64 |
|
65 http://mercurial.selenic.com/wiki/hgserve |
|
66 http://mercurial.selenic.com/wiki/HgWebDirStepByStep |
|
67 http://mercurial.selenic.com/wiki/StaticHTTP |
|
68 |
|
69 ** hgweb.config. |
|
70 |
|
71 Set allowed project by specifying paths to they (keys are URL, values are fs paths): |
|
72 |
|
73 [paths] |
|
74 myproject = /home/user/hg/myproject |
|
75 otherproject = /home/user/hg/otherproject |
|
76 |
|
77 You can use single wildcard '*' to search current subdirs or double wildcard '**' to search subdirs |
|
78 recursively: |
|
79 |
|
80 [paths] |
|
81 myproject = /home/user/hg/my/* |
|
82 otherproject = /home/user/hg/other/** |
|
83 |
|
84 Alternatively you can set a collection of repos (keys and values are both filesystem paths, keys |
|
85 should be prefixes of the values and are "subtracted" from the values in order to generate the URL |
|
86 paths to each repository): |
|
87 |
|
88 [collections] |
|
89 /home/user/hg = /home/user/hg |
|
90 /home/another/hg = /home/another/hg |
|
91 |
|
92 Allow archive downloads: |
|
93 |
|
94 [web] |
|
95 allow_archive = gz, zip, bz2 |
|
96 |
|
97 Make web page look nice: |
|
98 |
|
99 [web] |
|
100 style = gitweb |
|
101 |
|
102 Set another settings: |
|
103 |
|
104 [web] |
|
105 encoding = UTF-8 |
|
106 |
|
107 maxchanges = 100 |
|
108 maxfiles = 100 |
|
109 |
|
110 In each $proj/.hg/hgrc put: |
|
111 |
|
112 [web] |
|
113 contact = ADMIN <admin@example.com> |
|
114 description = <p style="color: red;">$proj</b> allow make a <a href="http://example.com">BIG Thing.</a> |
|
115 # Do not use name, in this case you see dir name where project lcated. |
|
116 # name = $proj |
|
117 |
|
118 To allow push in 'hg serv': |
|
119 |
|
120 [web] |
|
121 allow_push = * |
|
122 push_ssl = false |
59 |
123 |
60 http://mercurial.selenic.com/wiki/PublishingRepositories |
124 http://mercurial.selenic.com/wiki/PublishingRepositories |
61 Publishing Mercurial Repositories |
125 Publishing Mercurial Repositories |
62 |
|
63 * Publish repos. |
|
64 |
|
65 With static HTTP hosting you can copy via rsync, ftp, scp, etc., so long as all the files beneath |
|
66 .hg are copied. Also since 1.1 pull protocol can detect static HTTP hosting: |
|
67 |
|
68 $ hg clone http://example.com/project |
|
69 |
|
70 http://mercurial.selenic.com/wiki/hgserve |
|
71 http://mercurial.selenic.com/wiki/StaticHTTP |
|
72 |
126 |
73 ** init.d script. |
127 ** init.d script. |
74 |
128 |
75 #!/bin/sh |
129 #!/bin/sh |
76 CMD=/usr/bin/hg |
130 CMD=/usr/bin/hg |