[darcs-users] [patch307] Resolve issue1551: only use unchanged fi...

Eric Kow bugs at darcs.net
Wed Oct 20 17:39:38 UTC 2010


Eric Kow <kowey at darcs.net> added the comment:

3 patches for repository http://darcs.net:

Phew, this test failure confused me!  My patch removes the confirmation prompt
from darcs record if you don't make any modifications (*).

The result was that the issue1465 test would fail. Basically issue1465 seems
to be about checking Darcs' fall-through behaviour on editors.

Darcs tries exactly 5 editors in order
1. first of DARCS_EDITOR, DARCSEDITOR, VISUAL, EDITOR that is defined; or vi
2. emacs
3. emacs -nw
4. nano
5. edit

I think what Trent wants in that test is basically to make sure that we only
fall through from one editor (eg. from 1. to 2.) for legimitate reasons. A
legitimate reason would be the editor not existing. An illegitimate reason
would be the user hitting control-C or something (false in his test).

Two things about the test.  First, it tests for darcs record failing, but the
failure seems to come from Darcs's issue1551 follow-up confirmation prompt.
Take the prompt away and the expected failure goes away (hence the test
complaining).  Second, on MacOS X it was passing for the wrong reason (the
env -u error was confused for darcs legimitately failing).

My modifications remove the test for darcs failure while trying to preserve the
core idea of testing the fall-through behaviour.  One glaring omission in this
modification: what's Darcs supposed to do if the user hits ^-C or something?
Right now, it just goes ahead and records the patch. Shouldn't it fail?

(*) Because
    a. confirmation prompts are annoying and
    b. I claim that editing long-comment just to see it in an
        editor is a legitimate workflow
    
    However
    c. we still have to keep it in darcs send because there
    is no last resort

Sun Jul 18 10:34:48 BST 2010  Eric Kow <kowey at darcs.net>
  * Resolve issue1551: only use unchanged file content prompt in darcs send.

Wed Oct 20 15:16:27 BST 2010  Eric Kow <kowey at darcs.net>
  * Improve issue1465 test (portability, tidiness).
  
  - No env -u on MacOS X.
  - No need to clean up directories (new harness)
    Keeping them around makes debugging easier.

Wed Oct 20 18:24:22 BST 2010  Eric Kow <kowey at darcs.net>
  * Make issue1465 test a bit more straightforward.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch307>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolve-issue1551_-only-use-unchanged-file-content-prompt-in-darcs-send_.dpatch
Type: text/x-darcs-patch
Size: 54046 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20101020/6be1b416/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20101020/6be1b416/attachment-0001.obj>


More information about the darcs-users mailing list