darcs

Patch 565 test for issue2049 (and 1 more)

Title test for issue2049 (and 1 more)
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone 2.5.2

Created on 2011-03-11.20:05:25 by ganesh, last changed 2011-03-12.11:37:07 by ganesh.

Files
File name Status Uploaded Type Edit Remove
test-for-issue2049.dpatch ganesh, 2011-03-11.20:05:25 application/x-darcs-patch
unnamed ganesh, 2011-03-11.20:05:25 text/x-darcs-patch
unnamed ganesh, 2011-03-11.20:05:25
See mailing list archives for discussion on individual patches.
Messages
msg13815 (view) Author: ganesh Date: 2011-03-11.20:05:25
2 patches for repository http://darcs.net/releases/branch-2.5:

Thu Mar 10 07:58:12 GMT 2011  Ganesh Sittampalam <ganesh@earth.li>
  * test for issue2049
  This test passes with darcs 2.4 but fails with 2.5

Fri Mar 11 19:12:19 GMT 2011  Ganesh Sittampalam <ganesh@earth.li>
  * resolve issue2049: explicitly check for parent dir when recording an add
  The underlying hashed-storage routine doesn't currently throw when the
  parent dir isn't present.
Attachments
msg13818 (view) Author: kowey Date: 2011-03-11.21:40:15
Alright, this is me trying to retrain myself to use the
new terse review style.

On Fri, Mar 11, 2011 at 20:05:25 +0000, Ganesh Sittampalam wrote:
> Thu Mar 10 07:58:12 GMT 2011  Ganesh Sittampalam <ganesh@earth.li>
>   * test for issue2049
>
> Fri Mar 11 19:12:19 GMT 2011  Ganesh Sittampalam <ganesh@earth.li>
>   * resolve issue2049: explicitly check for parent dir when recording an add

+1 idea/implementation for both

test for issue2049
------------------
passes in Darcs 2.4 because we were still using SlurpDirectory,
I think

resolve issue2049: explicitly check for parent dir when recording an add
------------------------------------------------------------------------
> +                            ok <- treeHasDir cur parentdir

Sounds right.  parentdir is just takeDirectory f, which should
handle any weird variations like "foo/bar~/quux"

> +                            if ok

(same, just hunk moved)

> +                             else do
> +                                   putWarning opts . text $ msgSkipping msgs ++ " '" ++ f ++ "' ... couldn't add parent directory '" ++ parentdir ++ "' to repository"
> +                                   return (cur, Nothing, Nothing)

We can use addfailure here maybe if you want

Also on IRC Ganesh confirms that the use case of darcs add foo/bar
where foo is non-boring but non-boring still works (issue184)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey@jabber.fr (Jabber or Google Talk only)
History
Date User Action Args
2011-03-11 20:05:25ganeshcreate
2011-03-11 21:40:16koweysetmessages: + msg13818
2011-03-12 11:37:07ganeshsetstatus: needs-review -> accepted
milestone: 2.5.2