For all details and references of the project one can visit darcs-GSoC-2014-History-Reordering-Performance-and-Features.

## lunes, 14 de julio de 2014

### Month of June

Here goes a little summary of what I been doing between late june (9~21) and early july (1~11).

First and easy, I have been documenting Darcs.misplacedPatches (old name chooseOrder), D.P.W.Ordered and D.P.W.Sealed. Something to comment is that the semantics of misplacedPatches, not always can clean a tag doing darcs optimize reorder. For example; Suppose we have a repository, $r_1$ with the following patches;

$r_1$ $=$ $t_{1,0}$ $p_{1,0}$ $t_{1,1}$

here all tags are clean, but if we make another repository, say $r_2$, and we pull from $r_1$ of the
following way

$\$$darcs pull -a -p p_{1,0} r_1 (we want to pull the patch p_{1,0}, we assume that the name of the patch is p_{1,0} for the matching with -p option) \$$ darcs pull -a$r_1$so now we have,$r_2=p_{1,0}t_{1,0}t_{1,1}$and we see that$t_{1,0}$is dirty. Doing darcs optimize reorder not reorder nothing. What is going on is that to know what reorder, misplacePatches takes the first tag, in our case$t_{1,1}$, and "search" for what patches he don't tag. But$p_{1,0}$and$t_{1,0}$are tagged by$t_{1,1}$so there is nothing to reorder despite$t_{1,0}$is dirty. Therefore there is no way of clean$t_{1,0}$because misplacePatches always takes the first tag, so if a tag is tagging one or more dirty tags, this tags never be available to get clean. "Second", using the implementation of "reorder" one can get almost for free the option --reorder for the commands pull, apply and rebase pull. The behavior for the case of pull (for the others commands is the same basic idea) is that our local patches remain on top after a pull from a remote repository, e.i. suppose we have the followings$l$(ocal) and$r$(emote) repositories,$l=p_1p_2\ldotsp_nlp_{n+1}\ldotslp_mr=p_1p_2\ldotsp_nrp_{n+1}\ldotsrp_k$where$lp$are the local patches that don't belong to$r$, and vice versa for$rp$. Make darcs pull, leaves$l$as follow,$l=p_1p_2\ldotsp_nlp_{n+1}\ldotslp_mrp_{n+1}\ldotsrp_k$meanwhile make darcs pull --reorder, leaves$l$,$l=p_1p_2\ldotsp_nrp_{n+1}\ldotsrp_klp_{n+1}\ldotslp_m$making more easy to send the$lp\$ patches later.

"Third", beginning a new task, implement option minimize-context for command darcs send. Still no much to comment, I have almost finished implementing the option but with some doubts, I hope that for the end of the week have a more "prettier" implementation as well as a better understanding.