On Mon, Sep 22, 2008 at 08:57:32PM +0300, Vlad Dogaru wrote: > Hi, everyone, > > this is my first attempt at modifying darcs code, I hope everything is > acceptable. If not, apologies -- I've only recently become interested in > darcs.
Thanks for the contribution, and welcome! In the future, if you name you patch with a name like "resolve issue1041: Get: if URL is invalid, direcotry is not created" then our scripts will automatically close the bug with a link to this patch. > This patch solves issue 1041: on a `darcs get', if the URL is invalid, > then a directory for it is not created. Ah yes, this is something that has often bothered me, but I haven't gotten around to looking into... (since I'm usually thinking about what the correct URL was, when this happens) > Mon Sep 22 20:17:05 EEST 2008 Vlad Dogaru <[EMAIL PROTECTED]> > * Get: if URL is invalid, direcotry is not created (#1041) > > New patches: > > [Get: if URL is invalid, direcotry is not created (#1041) > Vlad Dogaru <[EMAIL PROTECTED]>**20080922171705] hunk > ./src/Darcs/Commands/Get.lhs 24 > - createDirectory ) > + createDirectory, removeDirectory ) > hunk ./src/Darcs/Commands/Get.lhs 131 > - rfsource <- case rfsource_or_e of Left e -> fail e > + rfsource <- case rfsource_or_e of Left e -> do > + -- remove the directory if > the repo URL is invalid > + setCurrentDirectory ".." > + removeDirectory > mysimplename > + fail e This looks like a correct fix, but perhaps not the best fix for this problem. I think this can be done more elegantly by simply moving the createDirectory mysimplename setCurrentDirectory mysimplename to be after the case statement you modified. I believe this will be safe, since I don't believe identifyRepoFormat is affected by the current directory (but if you I'll apply your current draft of the patch, and if you want to send a further refactor, that'd be great. David _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
