Am 25.06.20 um 18:52 schrieb James Cook:
> I'm trying to learn more about how darcs force commutes work.

There is a reason we do not have such a command ;-)

> What I'd like to do is create a repository R1 with patches A and B,
> and then look at the patches that result if A and B get
> force-commuted.
> 
> E.g. if I could pull just patch B and not A to a new repository, I
> think that would do the trick, but of course darcs pull won't let me
> do that because B depends on A.

The main question here is: What do you expect the result of such a
force-commute would be?

Let us take a very simple example:

A = addfile ./foo
B = hunk ./foo 1 [] ["some text"]

where the hunk notation is simplified but hopefully understandable (the
hunk here removes no lines and adds the line "some text").

Suppose you had a 'darcs force-commute' command, and you force-commuted
A;B to B';A'. What would you expect the B' then A' to be?

> Question 1: Is there a simple way to make darcs do this?

Not exactly simple, but it is possible:

darcs clone . ../saved
darcs rebase suspend # select B and A
darcs rebase obliterate # select A
darcs rebase unsuspend # select B
darcs pull ../saved # select A

You should expect to get conflicts first when you unsuspend B (after
obliterating A) and then also when you re-pull A from the clone. You
will probably want to amend the conflict resolution into the conflicted
patch.

> Question 2: Is there a way to make "darcs changes" show the patch
> contents?

-v or --verbose is your friend here.

Cheers
Ben

_______________________________________________
darcs-users mailing list
darcs-users@osuosl.org
https://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to