On Fri, Aug 21, 2015 at 12:02:46PM +0200, Johan Kuuse wrote:
> Hi,
>
> Everytime I create a new repos, I use a few files which I would like
> to have access to in all my repos:
>
> - README.fossil.new.repo : My own notes about how to setup a new repo.
> - setup-fossil.sh : A script how to setup a new repo automatically.
> - fossil-config.txt: A common configure file I would like to apply to
> all my repos.
>
> I would like to share these files among all my repos, both to access
> them and to update/improve them when needed.
> Anyway, to avoid duplicates of these files, I would preferred to
> update them in one single place, so these files probably should be
> stored in their own repos, what I would called a "shared" repos.
> Is there a way to achieve this? Or otherwise, any other solutions or
> workaround?
>
Hi,
I'm not sure to understand what you mean by shared repos, but here
different things you can do.
- Links in home page on each of your repos:
------------------------------------------------
If you want to have access to those file from each repo web
interface (home page, wiki or embedded documentation). Just keep
those file you talk about in it's own repository like you said
and have a link that refer to it.
This is useful for your documentation files, your script file
can be there as reference but you don't have it on your
checkout.
- Open nested repository:
-------------------------
If you want something a little bit like "git submodule" where
you can see the files of this "shared repo" in the checkout of
all your repos, you could open this shared repo in a subdirectory of
your other repo checkout by doing:
fossil open --nested /path/to/shared_repo.fossil
Note that you cannot open a nested repo in the checkout root of
another repo, it must be inside a subdirectory.
But this require that you open the shared repo manually and
since this repo seems to hold documentation, I don't see the
advantage of doing this over having a completely separate
checkout of a separate repo somewhere else in your filesystem.
I sometime use --nested option when I have some generic code
I share between different projects. I use a kind of bootstrap
script on the root of each repo. This script is responsible of
doing the necessary clone/open of my shared repos in the right
subdirectory. That way my different repo can use different
version or branch of the shared repo, useful when the shared
repo is in active development and I don't want to care much
about breaking compatibly on older projects that use it.
Hope this help.
--
Martin G.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users