Suppose you had the ability to create a "sub-repository" - a kind of clone
of a full fossil repo but that only contains a small subset of the
check-ins (and/or wiki and tickets, etc.)  A sub-repository would not even
be self-complete:  It would only contain artifacts for the file that
changed in the check-ins that it contains and would have to refer back to
the original repository for the unchanged files.

With the ability to create a sub-repository, a non-credentialed contributor
could clone the original repo, make his suggested changes in a branch, then
create a sub-repository of just that branch.  Since the sub-repository
would be relatively small (hopefully!), it could be sent in via email.  Or
maybe even attached to a ticket!

When the project leader receives the sub-repository, he does:

      fossil ui subrepo.fossil --master-repo original-project.fossil

Fossil works on subrepo.fossil just like it would with a regular
repository, except that if it is unable to find an artifact that it needs,
it spills over to original-project.fossil.  original-project.fossil is
treated as read-only for that particular fossil instance, so no information
from subrepo.fossil can leak into original-project.fossil.

Perhaps you should persistently attach the subrepo to the original project
like this:

     fossil set master-repository ~/myrepos/original-project.fossil -R
subrepo.fossil

Thereafter, subrepo.fossil works normally, except that it looks to
original-project.fossil for any artifacts that it is missing.

So you can then check-out the subproject in a separate directory:

     fossil open ~/tmp/subrepo.fossil

Compile it.  Diff it.  Etc.  And if you are satisfied that you want it in
the core, you can incorporate the changes into the original project using
something like this:

     fossil push file:/home/me/myrepos/original-project.fossil

The key point of this design is that it requires very few modifications to
the current Fossil implementation.  All we have to do is add the
"master-repository" property that identifies a read-only fossil file that
is used to look up missing artifacts.  Oh, and also add the command to
create a subrepository.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to