darcs

Issue 1162 "darcs add non-existing/" gets "darcs: bug in darcs! Empty filename in is_relative at src/Darcs/URL.hs:54" (2.1.0+60)

Title "darcs add non-existing/" gets "darcs: bug in darcs! Empty filename in is_relative at src/Darcs/URL.hs:54" (2.1.0+60)
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List bfr, darcs-devel, dmitry.kurochkin, kowey, thorkilnaur
Assigned To
Topics Regression

Created on 2008-10-24.16:00:55 by bfr, last changed 2009-10-23.23:46:14 by admin.

Files
File name Uploaded Type Edit Remove
darcs-changes-s bfr, 2008-10-24.16:00:47 text/plain
darcs-exact-version bfr, 2008-10-24.16:00:41 text/plain
Messages
msg6428 (view) Author: bfr Date: 2008-10-24.16:00:53
ben@sarun[1]: .../epics/base-3.14.8 > darcs whatsnew -l
M ./pkgs/top-level/all-packages.nix +4
a ./pkgs/development/epics/
a ./pkgs/development/epics/base-3.14.8/
a ./pkgs/development/epics/base-3.14.8/builder.sh
a ./pkgs/development/epics/base-3.14.8/default.nix
ben@sarun[1]: .../epics/base-3.14.8 > darcs add -r ./pkgs/development/epics/
darcs: bug in darcs!
Empty filename in is_relative at src/Darcs/URL.hs:54 compiled Oct 12 2008 
01:05:34
You can check to see if this bug is already known at http://bugs.darcs.net/
If it is not, please report this to bugs@darcs.net
If possible include the output of 'darcs --exact-version'.
ben@sarun[1]: .../epics/base-3.14.8 > darcs --version
2.1.0 (+ 66 patches)

I attached the output of darcs --exact-version and the output of darcs 
changes -s. As you can see the repo contains only one (large) patch.

There are some related bugs (i.e. "Empty filename in is_relative...") on the 
tracker but all of them closed before I built this version of darcs and 
none with this command.
Attachments
msg6516 (view) Author: thorkilnaur Date: 2008-10-29.11:07:58
Thanks a lot for this bug report. As I understand it, you are trying to add a 
file (./pkgs/development/epics/) that doesn't exist (because your current 
directory when you issue the command is actually 
.../pkgs/development/epics/base-3.14.8). And then you get this fairly disturbing 
"bug in darcs!" message, instead of a friendly error message.

I can reproduce this as follows (note the terminating / in the darcs add 
command):

> $ darcs --version
> 2.1.0 (+ 155 patches)
> $ mkdir repo
> $ cd repo
> $ darcs init
> $ darcs add non-existing-directory/
> darcs: bug in darcs!
> Empty filename in is_relative at src/Darcs/URL.hs:54 compiled Oct 14 2008 
09:46:01
> You can check to see if this bug is already known at http://bugs.darcs.net/
> If it is not, please report this to bugs@darcs.net
> If possible include the output of 'darcs --exact-version'.
> $ 

With an earlier darcs, the result is:

> $ darcs --version
> 2.0.2 (release)
> $ mkdir repo
> $ cd repo
> $ darcs init
> $ darcs add non-existing-file/
> darcs: non-existing-file: getSymbolicLinkStatus: does not exist (No such file 
or directory)
> 
> $ 

I presume that you have managed to proceed and will work out a test case for 
this bug shortly.

Thanks again and best regards
Thorkil
msg6517 (view) Author: bfr Date: 2008-10-29.12:55:04
On Wednesday 29 October 2008 12:08, Thorkil Naur wrote:
> [ snipped analysis of bug]
> I presume that you have managed to proceed and will work out a test case
> for this bug shortly.

Many thanks for looking into this. And yes, the problem did (of course) not 
appear when I tried again some time later and as you suggest this is most 
probably because I called darcs from the right directory (or gave it the 
proper path argument).

Cheers
Ben
-- 
"Programming = Mathematics + Murphy's Law" (E.W.Dijkstra)
msg6524 (view) Author: thorkilnaur Date: 2008-10-29.19:21:05
Here is the test. So, who is now going to actually fix the problem?

Best regards
Thorkil

On Wednesday 29 October 2008 16:58, David Roundy wrote:
> On Wed, Oct 29, 2008 at 03:53:41PM +0100, Thorkil Naur wrote:
> > Wed Oct 29 15:33:17 CET 2008  Thorkil Naur <naur@post11.tele.dk>
> >   * Add (failing) test for issue1162
> 
> Applied, thanks!
> 
> David
> _______________________________________________
> darcs-users mailing list
> darcs-users@darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-users
>
msg6526 (view) Author: kowey Date: 2008-10-29.20:15:39
Adding the Regression tag because this appears to be a regression from 2.0.2
(according to Ben).  Looks like we still have some issues to wring out in the
file path code.

Note that I have some patches waiting which will remove the UglyFileName and
FilePathUtils modules, so we should probably wait until those go in (or get
rejected) before looking into this issue more.  Assigning to myself to release
this ticket when this happens.
msg6678 (view) Author: kowey Date: 2008-11-14.22:30:35
Releasing the ticket because UglyFileName is now gone
msg7542 (view) Author: bfr Date: 2009-03-28.16:13:47
The following patch updated the status of issue1162 to be resolved:

* Resolve issue1162: makeAbsolute is now a total function 
Ignore-this: d0eb6f94c88610580daa176e39877bc3
msg7590 (view) Author: bfr Date: 2009-04-07.17:26:58
The following patch updated the status of issue1162 to be resolved:

* moved test for resolved issue1162 from bugs to tests 
Ignore-this: 34f0fc91b57c017e101cb068537b0c79
History
Date User Action Args
2008-10-24 16:00:55bfrcreate
2008-10-29 11:08:02thorkilnaursetpriority: bug
status: unread -> has-patch
assignedto: thorkilnaur
messages: + msg6516
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
2008-10-29 12:55:06bfrsetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
messages: + msg6517
2008-10-29 19:21:07thorkilnaursetstatus: has-patch -> needs-reproduction
assignedto: thorkilnaur -> (no value)
messages: + msg6524
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
title: Empty filename in is_relative after darcs add -r -> "darcs add non-existing/" gets "darcs: bug in darcs! Empty filename in is_relative at src/Darcs/URL.hs:54"
2008-10-29 20:15:43koweysettopic: + Regression
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
assignedto: kowey
messages: + msg6526
title: "darcs add non-existing/" gets "darcs: bug in darcs! Empty filename in is_relative at src/Darcs/URL.hs:54" -> "darcs add non-existing/" gets "darcs: bug in darcs! Empty filename in is_relative at src/Darcs/URL.hs:54" (2.1.0+60)
2008-11-14 22:30:37koweysetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
messages: + msg6678
assignedto: kowey ->
2009-03-28 16:13:50bfrsetstatus: needs-reproduction -> resolved
nosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
messages: + msg7542
2009-04-07 17:27:01bfrsetnosy: kowey, dagit, simon, thorkilnaur, dmitry.kurochkin, bfr
messages: + msg7590
2009-08-10 23:49:03adminsetnosy: - dagit
2009-08-17 06:18:33koweylinkissue1482 superseder
2009-08-25 17:31:59adminsetnosy: + darcs-devel, - simon
2009-08-27 14:25:04adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin, bfr
2009-10-23 22:35:17adminsetnosy: + benjamin.franksen, - bfr
2009-10-23 23:46:14adminsetnosy: + bfr, - benjamin.franksen