darcs

Patch 1716 fix and simplify checkUnrecordedConflicts

Title fix and simplify checkUnrecordedConflicts
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2018-08-25.08:25:32 by bfrk, last changed 2018-10-17.06:47:04 by ganesh.

Files
File name Status Uploaded Type Edit Remove
fix-and-simplify-checkunrecordedconflicts-and-then-inline.dpatch bfrk, 2018-08-25.08:25:22 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg20247 (view) Author: bfrk Date: 2018-08-25.08:25:22
Another iteration of cleaning up tentativelyMergePatches.

2 patches for repository http://darcs.net/screened:

patch 0b30a12378c874d1cc9ed41a537e80810d3ed755
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Jul 22 14:24:46 CEST 2018
  * fix and simplify checkUnrecordedConflicts and then inline
  
  The implementation in checkUnrecordedConflicts really only checked for
  conflicts with pending, but we need to check for conflicts with
pending and
  working; and the merge that gives us this information has already been
  calculated in tentativelyMergePatches: all new conflicts are contained in
  them'' and new conflicts with pending and working are contained in pw'.
  
  Also, when tentativelyMergePatches is called by a remote apply (during
  execution of a push command), there is no interactive stdin, so promptYorn
  throws an exception, which is now cought. This fixes an existing bug that
  was hidden because the prompting happened only for conflicts with the
remote
  pending, whereas it now happens for all conflicts with unrecorded changes.

patch a3a406c6de37030ea1fdbc568e9db1fe139b9e22
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Jul 13 20:12:43 CEST 2018
  * adapt tests after fix to detection of conflicts with unrecorded
  
  We now get prompted for confirmation whenever we create a conflict with
  unrecorded changes, instead of only for conflicts with pending. This patch
  makes the necessary adaptions to the test scripts.
  
  Some test deliberately pull patches on top of unrecorded changes; for
these,
  we prepend "echo y | ..." to simulate the users consent. Other tests issue
  multiple conflicting pull commands; the conflict with unrecorded changes
  here is accidental due to the conflict markup generated by earlier
pulls, so
  they are adapted by adding --allow-conflicts to suppress generation of
  conflict markup.
Attachments
msg20368 (view) Author: ganesh Date: 2018-10-05.06:43:21
Looks good. I haven't tried it out in practice but it makes
sense.

A trivial point, in pull.sh, you added this comment:

> # this is now recognized as a conflict with working:

It'd be better to omit the word "now" as it really refers
to this transition rather than a single snapshot of the
code.
History
Date User Action Args
2018-08-25 08:25:32bfrkcreate
2018-08-25 13:39:33bfrksetstatus: needs-screening -> needs-review
2018-10-05 06:43:21ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg20368
2018-10-17 06:47:04ganeshsetstatus: accepted-pending-tests -> accepted