[darcs-users] new --dont-allow-conflicts (was: Re: Distributed conflicts?)
mark at summersault.com
Sun Nov 14 00:41:13 UTC 2004
> Instead, I've gone for a different approach that approximates the same
> behavior. I've decided (but could perhaps be convinced to change my mind,
> if people object) to change the default behavior of apply, which is called
> by push on the server. I added a new flag --dont-allow-conflicts, which is
> now the default. As one might guess from its name, apply will now fail if
> the application of the patch would result in an unresolved conflict. This
> *should* have roughly the effect you suggested, except that we don't ask
> for confirmation, and there's no option for the push to override this
> default, although it can be overridden by changing the default apply
> behavior on the target repo.
> This change in default behavior means that people applying patches by hand
> (or from their mailer), who probably prefer the current behavior, will need
> to use the --mark-conflicts flag. If enough people object to this, I could
> make the push command specify --dont-allow-conflicts when it calls apply,
> and leave --mark-conflicts as the default behavior for apply.
I think I like this behavior, and just recompiled darcs to try it out.
It didn't work for me though-- conflicts were still marked in the repo
I pushed to.
However, I suspect it failed for a different reason which I understand:
I gave an explicit patch to darcs when I called patch. However, I think
'push' just looks for 'darcs' in the path, which would meant that an
older version of darcs would have been used for the 'apply'.
Could this be fixed that so for a local 'push', the 'darcs' you apply
with is the same one you push with? I know that Perl has a way to
handle this concept, I imagine Haskell does too.
Even better, perhaps this line in 'Apply.lhs' could be replaced with some
direct library calls, and avoid improve the performance penalty of
spawning another process:
execPipeIgnoreError "darcs" ["apply","--all","--repodir",repo] bundle
More information about the darcs-users