‎I've managed to do this by using bundles.  Like OP, I needed to be able to 
share work between repos in seamless way. See below for my use case. 

The only drawback is that I had to share more than I wanted (i.e. whole trunk 
branch) and had to resort to 'unofficial' Fossil build (which may or may not 
have something to do with a recent bu‎g allegedly causing lost work; look it up 
on the list). I deducted that I should be OK, if I'm wrong - let me know, 
people :)

Use case: we have a long running dev project that will also inflict major 
changes to codebase organisation. There is also active development in other 
branches that will be merged to trunk on release and must be then merged to our 
project immediately, to allow us to pick up issues with our code ASAP. 

The team is also aided with external people who would be preferably constrained 
on what they can see in the current repo. 

Approach: export the current state of trunk to separate repo, develop our 
project in branch. Refresh trunk from our main repo when new release hits, and 
merge down regularly.

Steps:

1. Get a Win 64 (I'm on Win) build from Jan that will allow you to create new 
Fossil repo without initial checkin from here: 
http://sourceforge.net/projects/cyqlite/files/fossil/

This is crucial because the binary downloaded from Fossil site always creates 
the initial commit and you end up with two trunks that can't be merged because 
there are no common ancestors. 

2. f64 new sub-repo.fossil

3. f bundle export -R main-repo.fossil --branch trunk trunk.bundle

I had to get whole trunk branch:  the --from or --checkin‎ options didn't work 
because I ended up with missing content. It would be nice if there is an option 
to get the full artifacts, not just deltas (I thought --standalone was supposed 
to do that, but using that produced missing content too). It would be even 
nicer to have the bundle command that will create such a starting repo for you 
(e.g. bundle subrepo  -R main.fossil subrepo.fossil --checkin trunk). That way 
we could have the subrepo with arbitrary checkin from the main repo as the 
initial checkin, but be able to add subsequent ones later and merge. 

4. f bundle ‎import -R sub-repo.fossil trunk.bundle --force

5. f publish -R sub-repo.fossil trunk

That's it. After that I checked out subrepo and created a branch with couple of 
commits. Subsequent export / import (using --from and --branch trunk to 
restrict export to only the later trunk unexported checkins) "grafted" the 
sequence of main repo trunk check-ins at the correct place in subrepo trunk, 
and I was able to merge down to the subrepo branch without problems. 

I didn't test yet exporting the branch from subrepo, importing to main repo 
trunk and merging‎ back to main repo trunk, as I don't need that (our main repo 
will be retired and our subrepo will replace it). But that should work if the 
branch is created in main repo trunk before initial export, maybe even without 
that. 

Cheers,
Steve

  Original Message  
From: Ross Berteig
Sent: Tuesday, 22 September 2015 05:45

On 9/21/2015 10:32 AM, Warren Young wrote:
> On Sep 21, 2015, at 10:21 AM, Ron Aaron <[email protected]> wrote:
>>
>> I was hoping in vain for an easier solution.
>
> How would you imagine Fossil would support this, which would end up being 
> easier?

What about the Bundle mechanism?

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to