Hi,

On 28/01/2020 10:37, Ben Franksen wrote:

> It would be quite convenient to have a --rebase option for obliterate
> that automatically suspends all patches that depend on the one(s) you
> want to obliterate.

> Note that this is something completely different than 'rebase
> obliterate' which is about obliterating suspended patches. So this is a
> point where the strict rule "everything that affects rebase must be a
> subcommand of rebase" breaks down.

FWIW this isn't really a strict rule anyway, in the sense that any darcs
operation can create fixups - although not currently to add or remove
suspended patches. I certainly don't see any problem with departing from it.

> To make it crystal clear what the expected behavior is, we could name
> the option --suspend-conflicting. Commands from group (1) would remain
> as they are. Commands from group (2) would get a different UI:
> 
>   rebase pull -> pull --suspend-conflicting
>   rebase apply -> apply --suspend-conflicting

Perhaps --suspend-local? I find that clearer and it would also allow
--suspend-remote. But I remember we have discussed some of this before,
and I can't remember what my opinion then was :-)

> We could then add
> 
>   push --suspend-conflicting
> 
> (which I have been proposing some time ago) and also a new option
> --suspend-depending to get
> 
>   obliterate --suspend-depending
>   unrecord --suspend-depending
>   amend --suspend-depending
> 
> Or we could shorten both options to just --suspend for more uniformity
> (and less typing) but less clarity.

I think all this would be good.

> Another data point is that in the future we may want to offer even more
> possibilities for treating conflicts (or dependencies that are in the
> way). One feature I have in mind is a --branch option for push, pull,
> apply, etc (mutually exclusive with --suspend) with the semantics of
> creating a new branch for the conflicting patches. (This would be
> similar in behavior to the once proposed stash command, but I believe
> internal branches are the more powerful feature.)

This is probably worth a separate thread, but I think branches can be
implemented on top of what I originally implemented as "stash". The
primitive operation is to be able to suspend and unsuspend patches
without losing their identity. On top of that the most important thing
is some way to name a branch and easily switch to it, suspending and
unsuspending whatever is necessary. I would like to avoid all the
complications git has with tracking multiple remote branches.

> One could also imagine a fully interactive solution: for each
> conflicting patch we are asked whether we want to

That sounds good too.

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

Reply via email to