[darcs-users] some special amend-records
Piyush P Kurur
ppk at cse.iitk.ac.in
Fri Mar 22 10:40:24 UTC 2013
On Fri, Mar 22, 2013 at 07:40:32AM +0000, Ganesh Sittampalam wrote:
> On 22/03/2013 07:02, Piyush P Kurur wrote:
> > (3) Is this feature implied by any other work in progress?
> 'darcs rebase' will support this and will be in the upcoming 2.10
> release - hopefully within the next few months. In the meantime you can
> install it from the development repo at http://darcs.net
> Note that the patch identity of p3 and p4 will be changed along with p2,
> so any repositories already containing p2, p3 and p4 will see the new
> patches as different.
> In your scenario the amendment to p commutes with p3 and p4 so there
> won't be any conflicts. If it didn't commute, then you would have to
> resolve conflicts when unsuspending p3 and p4.
Here is one more related question: It is regarding a variant of amend
I had a look at the http://darcs.net/Ideas/RebaseDesign. Not grokked
it fully but looks like there is a change in the patch data type. In
this context I would like to explore amend-record a bit more
Situation: p0, p1, p2, p3, p4 and the amend is to be done on p2.
Currently amend-record seems to be doing the following.
(1) Starting from the last patch (p4 here), select the recorded patch
to amend by commuting it to the end of the list by asking the
(2) Cherry pick the changes in the working copy of the repository.
(3) Merge the change into the patch selected in step (1)
Instead if we were to change the order of (1) and (2), we get a cousin
of amend-record (neither subsumes the other). Call it record-amend for
time being. So the algorithm to record-amend should be
(1) Cherry pick the changes to the working copy of the repository. Let
us call this picked patch p.
(2) Go over the list of patches in the reverse order (i.e. p4 then p3
then p2) as long as p commutes over them.
(3) When the user says stop then merge p and the current patch.
It looks like the record-amend that I said need no change in the patch
data type (or I might be missing something). It seems to be applicable
in use cases like, adding a missing file, or fixing a typo in the
commit message etc where the current amend-record does not work. Does
it make sense to have this variant even in the presence of rebase?
More information about the darcs-users