[darcs-users] How to make branches.

Tommy Pettersson ptp at lysator.liu.se
Sat Nov 26 22:54:15 UTC 2005


On Sat, Nov 26, 2005 at 09:04:27PM +0000, Daniel Carrera wrote:
> I notice that I need to have read access to your repository to send you 
> a patch. I didn't expect that, but after thinking about it, I can see 
> that it makes sense. Let's see if I understand why:
> 
> We both start with patches A B. I make change C and you make change D. 
> So I have A B C and you have A B D. If I want to send you C, Darcs has 
> to merge the sets of changes C and D. This merger happens at the moment 
> of patch creation because that's when Darcs can be sure to have the two 
> trees to compare.

Patch C is created when you Record your changes, and no
information is need about other repos at that time.

When you send patches the target repo is read for basically
two reasons:
  1) to see which of all your patches are already in the target
     so you only get asked about your extra ones.
  2) to permute the patches you send to fit the target repo
     (as you've already concluded).

Patch D (and the merge) comes into play first when your
patch C is applied to the target repo. Applying a patch to
a repo is a reversible action. If C causes a conflict with
D and you remove C from the repo, the conflict disappears.
To keep two conflicting patches in a repo you "cover" them
with a new patch that resolves the conflict.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list