darcs

Patch 1437 Add some tests for how conflicts are rep... (and 2 more)

Title Add some tests for how conflicts are rep... (and 2 more)
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone

Created on 2016-01-21.18:32:00 by ganesh, last changed 2016-01-27.09:51:09 by gh.

Files
File name Status Uploaded Type Edit Remove
add-some-tests-for-how-conflicts-are-reported.dpatch ganesh, 2016-01-21.18:32:00 application/x-darcs-patch
patch-preview.txt ganesh, 2016-01-21.18:32:00 text/x-darcs-patch
unnamed ganesh, 2016-01-21.18:32:00 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg18952 (view) Author: ganesh Date: 2016-01-21.18:32:00
Some cleanups for conflict reporting

3 patches for repository darcs-unstable@darcs.net:screened:

patch 7c38cde1441998f774de137f6b0ca7373000b328
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Thu Jan 21 07:54:55 GMT 2016
  * Add some tests for how conflicts are reported
  
  The test of 'changes' currently fails because that
  command erroneously marks all files as conflicted if
  there is a single conflict in a patch.
  

patch 988453d864a45d5b386d57273df19c71eba65a4f
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Thu Jan 21 17:36:53 GMT 2016
  * Get rid of default implementation of conflictedEffect
  
  It should only be used at "leaves", if at all.
  

patch 6b9a625733767d360d7be32e5fd703cf02fe347b
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Thu Jan 21 17:39:18 GMT 2016
  * move listConflictedFiles out of Conflict class
  
  It should always be derivable from the resolveConflicts result.
Attachments
msg18968 (view) Author: gh Date: 2016-01-26.10:11:51
Shell test is OK (and I was not aware of that bug!).

I don't understand why the second patch fixes the bug, though. I think
listConflictedFiles does the job of listing the files, so why does
removing the default implementation of conflictedEffect change anything?
msg18975 (view) Author: ganesh Date: 2016-01-26.18:42:07
'conflictedEffect' is used in summaries, 'listConflictedFiles' is used 
when reporting conflicts on pull etc.

I'm gradually trying to simplify this mess :-)
msg18979 (view) Author: gh Date: 2016-01-27.09:51:08
I get it. The second patch fixes summaries (which are tested at the very
end of the shell test script). listConflictedFiles was always working
fine. OK.

About the third patch, I think I agree. Accepted!
History
Date User Action Args
2016-01-21 18:32:00ganeshcreate
2016-01-22 15:42:19ghsetstatus: needs-screening -> needs-review
2016-01-26 10:11:51ghsetmessages: + msg18968
2016-01-26 18:42:07ganeshsetmessages: + msg18975
2016-01-27 09:51:09ghsetstatus: needs-review -> accepted
messages: + msg18979