Mercurial subrepo and relative path -
i have project, have bitbucket repository for, , dependent on project incorporate subrepo. now, don't have push access subrepository, nor want or need to--it's pull-only relationship.
i realize when push main repository, try push subrepositories, well. since cannot that, pulled local copy of dependent project, @ same level main repository's directory. in essence, have following layout:
main/ ; pushes https://mine.org/main .hg/ .hgsub lib/ subrepo/ ; clone of main/../subrepo/ .hg/ subrepo/ ; local copy of https://forbidden.org/subrepo .hg/
the content of .hgsub
like,
lib/subrepo = ../subrepo
then cloned,
~/path/to/main $ hg clone ../subrepo/ lib/subrepo
so far, good. problem is, after set , committed changes, when try push main mercurial try push subrepo https://mine.org/subrepo, not exist, thereby failing whole push operation.
is there i'm missing?
why not create https://mine.org/subrepo -- if don't want advertise can turn on hide
in [web]
section in .hg/hgrc
file. pattern i'm used to, clone down main repo , subrepos in same layout @ each place you'll use them: both development box , web-facing hgweb install.
alternately, use [subpaths]
section in main/.hg/hgrc
in it:
[subpaths] https://mine.org/subrepo = https://forbidden.org/subrepo
which should let intercept derrived target push , point @ place won't let push, let see nothing has changed push can continue.
Comments
Post a Comment