[darcs-users] darcs patch: Resolve issue1588: make --dont-allow-conflicts filter ...

Ganesh Sittampalam ganesh at earth.li
Tue Sep 29 20:57:54 UTC 2009


Hi,

Please don't apply this until we've had some discussion.

The problem I'm trying to solve with this patch is the issue described
in http://bugs.darcs.net/issue1588, namely how to pull all the patches
from a remote repo that don't cause conflicts.

There's been some discussion on that bug, and on the list recently:
http://lists.osuosl.org/pipermail/darcs-users/2009-September/021176.html

I've attached one possible solution to the problem - (1) below. 
However there are multiple possible designs. I've outlined the ones
I've thought of and consider reasonable below. Although most of points
I've made about each option are negative, this should be considered in
the context of not having the downsides of the other options :-)

Cheers,

Ganesh

(1) Repurpose --dont-allow-conflicts for both pull and apply
 - slightly complicated exit code behaviour
 - changes existing functionality
 - push isn't atomic any more: you might get some but not all changes applied

(2) Add a new option --skip-conflicts for both pull and apply
 - requires a new option and extra code to support

(3) Repurpose --dont-allow-conflicts just for pull
 - changes existing functionality
 - apply and pull become inconsistent

(4) = (1) +  Add --dont-allow-conflicts to push and make it the default
 - some more work (but I could probably do it soon)
 - slightly complicated exit code behaviour
 - changes existing functionality
 - push might get slower/more network intensive by default

(5) = (1) + Add --dont-allow-conflicts to push and don't make it the default
 - some more work (but I could probably do it soon)
 - slightly complicated exit code behaviour
 - changes existing functionality
 - push is no longer atomic by default

(6) Enhance --match to detect conflicts, as per previous discussion
 + general interface
 + solves another feature request too
 - significantly more work (I probably won't have time in the near future)
 - also requires a behaviour change to the 'touch' matcher for consistency
 - not obvious that --match should be based on properties *after* the merge





Tue Sep 29 18:38:07 BST 2009  Ganesh Sittampalam <ganesh at earth.li>
  * Resolve issue1588: make --dont-allow-conflicts filter out conflicts
  
  This is a behaviour change; previously it failed completely if any patches 
  were conflicting. Now if the flag is given then any patches that would cause 
  a new conflict in the repo are not even offered.
  
  This change is for both pull and apply. Having it for apply means that the 
  behaviour of push operations are also altered: push will still offer all
  patches, but the remote apply will by default use --dont-allow-conflicts
  and will thus commute out any patches that would cause a conflict, and apply
  the rest, rather than failing completely. A better UI for push might be
  for it to be able to filter the patches as well (and default to doing so),
  but this might involve more communication with the remote repo.
  
  Note that both pull and apply will still exit with an error code if --all
  is used (either explicitly or by default) and conflicts were found.
  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 53383 bytes
Desc: A darcs patch for your repository!
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090929/728ff5ea/attachment-0001.bin>


More information about the darcs-users mailing list