comparison mercurial/help/subrepos.txt @ 32005:2406dbba49bd

serve: add support for Mercurial subrepositories I've been using `hg serve --web-conf ...` with a simple '/=projects/**' [paths] configuration for awhile without issue. Let's ditch the need for the manual configuration in this case, and limit the repos served to the actual subrepos. This doesn't attempt to handle the case where a new subrepo appears while the server is running. That could probably be handled with a hook if somebody wants it. But it's such a rare case, it probably doesn't matter for the temporary serves. The main repo is served at '/', just like a repository without subrepos. I'm not sure why the duplicate 'adding ...' lines appear on Linux. They don't appear on Windows (see 594dd384803c), so they are optional. Subrepositories that are configured with '../path' or absolute paths are not cloneable from the server. (They aren't cloneable locally either, unless they also exist at their configured source, perhaps via the share extension.) They are still served, so that they can be browsed, or cloned individually. If we care about that cloning someday, we can probably just add the extra entries to the webconf dictionary. Even if the entries use '../' to escape the root, only the related subrepositories would end up in the dictionary.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 15 Apr 2017 18:05:40 -0400
parents 63a57a2727b6
children 27196b7fc1ac
comparison
equal deleted inserted replaced
32004:bd3cb917761a 32005:2406dbba49bd
134 :push: Mercurial will automatically push all subrepositories first 134 :push: Mercurial will automatically push all subrepositories first
135 when the parent repository is being pushed. This ensures new 135 when the parent repository is being pushed. This ensures new
136 subrepository changes are available when referenced by top-level 136 subrepository changes are available when referenced by top-level
137 repositories. Push is a no-op for Subversion subrepositories. 137 repositories. Push is a no-op for Subversion subrepositories.
138 138
139 :serve: serve does not recurse into subrepositories unless
140 -S/--subrepos is specified. Git and Subversion subrepositories
141 are currently silently ignored.
142
139 :status: status does not recurse into subrepositories unless 143 :status: status does not recurse into subrepositories unless
140 -S/--subrepos is specified. Subrepository changes are displayed as 144 -S/--subrepos is specified. Subrepository changes are displayed as
141 regular Mercurial changes on the subrepository 145 regular Mercurial changes on the subrepository
142 elements. Subversion subrepositories are currently silently 146 elements. Subversion subrepositories are currently silently
143 ignored. 147 ignored.