[darcs-users] darcs patch: Resolve issue1588: make--dont-allow-conflicts filter ...
ganesh.sittampalam at credit-suisse.com
Fri Oct 2 12:33:38 UTC 2009
Dan Pascu wrote:
> On 2 Oct 2009, at 07:38, Ganesh Sittampalam wrote:
>> In this particular case, the natural code behaviour will be that --
>> skip-conflicts is "stronger" than --dont-allow-conflicts or --mark-
>> conflicts, in that it will cause the list of patches to be filtered
>> appropriately before the other options are even considered, which in
>> turn would mean that the other options had no effect.
> I'm not sure I understand what do mean here. You say that --skip-
> conflicts should take precedence no matter where it is specified
> (defaults file or command line)?
That's what I'm saying will happen if I take the simplest possible
implementation approach. The reason for that is that its effect is
earlier than that of --don't-allow-conflicts and --mark-conflicts; it
filters the list of patches before they are even offered to the user,
whereas the latter two options take effect after the user has selected
some patches. Those options will remain in force if specified, but they
become meaningless because only non-conflicting patches can have been
> If that is so, I do not think it
> would be the best choice. For example if I specify skip-conflicts in
> the defaults file, but then I use --dont-allow-conflicts on the
> command line, I expect the command line switch to take precedence
> over whatever is specified in the defaults file, otherwise it will be
> I already reported a similar problem, where if I have mark-conflicts
> in the defaults file but I use --dont-allow-conflicts on the command
> line, the later is ignored; it may have been the other way around, I
> don't remember exactly, however the point is that a command line
> switch is ignored while the value from the defaults file is used,
> which is confusing. The command line should always take precedence
> over the defaults file. Also if multiple orthogonal switches are
> specified on the command line, the usual practice is to use the last
Did you mean to say "mutually exclusive" rather than "orthogonal" here?
In my opinion, for mutually exclusive options, you're certainly right
about picking the last option specified (with defaults implicitly coming
before the command line).
However it's not completely obvious to me that --skip-conflicts really
is mutually exclusive with --don't-allow-conflicts. In particular, with
--don't-allow-conflicts but not --skip-conflicts, you'll get offered
every patch and then get a failure if any conflict. So if we accept your
argument, and you have --skip-conflicts as a default and then you
specify --don't-allow-conflicts on the command line, then suddenly
you'll get conflicting patches offered to you. My general feeling is
that --skip-conflicts may not be that useful as a default, and the more
likely use cases are for the user to specify --mark-conflicts or
--don't-allow-conflicts in the defaults file, and then to override that
on the command line with --skip-conflicts.
This debate is precisely why I initially submitted the patch to just
repurpose --don't-allow-conflicts, btw :-) However I do agree that the
loss of atomic behaviour for push in that case is quite bad.
Please access the attached hyperlink for an important electronic communications disclaimer:
More information about the darcs-users