Couldn’t this also be used to solve another problem, that of keeping separate 
repos for various projects that depend on (sometimes massive) common library 
files?  Currently to deal with that I have to put all projects under the same 
repo, which is not ideal.  The alternative, keeping multiple copies of shared 
code is also problematic.

But this proposed change sounds like a possible solution for the above problem 
also, no?
The main repo would hold the shared code, and each sub-repo the individual 
projects that depend on the shared code.

Regards,

From: Richard Hipp 
Sent: Thursday, June 05, 2014 4:14 PM
To: Fossil SCM user's discussion 
Subject: Re: [fossil-users] Outside contribution feature

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