darcs

Issue 227 get --context fails with absolute path in win32

Title get --context fails with absolute path in win32
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, eivuokko, jaredj, keturn, kowey, markstos, rgm, thorkilnaur, tommy, wglozer
Assigned To
Topics ProbablyEasy, Windows

Created on 2006-08-02.01:27:37 by keturn, last changed 2009-10-24.00:07:26 by admin.

Messages
msg835 (view) Author: keturn Date: 2006-08-02.01:27:33
It seems as if when you pass an absolute path to 'darcs get --context', it
doesn't recognize it as an absolute path, and appends it to the working
directory.  The result is something like this:

darcs.EXE:
C:/cygwin/home/kevint/tsrc/Buildbot/_trial_temp/slavebase/vc-dir/C:/cygwin/home/kevint/tsrc/Buildbot/_trial_temp/slavebase/vc-dir/.darcs-context:
openBinaryFile: invalid argument (Invalid argument)

using the win32 build of darcs 1.0.7.
msg2582 (view) Author: markstos Date: 2008-01-19.05:43:08
keturn,

Thanks for the report. Are you able to test again with Darcs 1.0.9 or one of the
2.0 pre-release builds from the wiki?
msg2712 (view) Author: markstos Date: 2008-01-24.02:32:00
Even though I'm not very literate in Haskell, I think I confirmed this bug in
the source code. In src/Darcs/Commands/Get.lhs, these lines look to me like a
hard-coded assumption that an absolute path would always start with: "/":

  let opts = fix_context orig_opts
      fix_context o@(Context ('/':_):_) = o
      fix_context (Context f:os) = Context (former_dir++"/"++f):os
      fix_context (o:os) = o : fix_context os
      fix_context [] = []
msg2713 (view) Author: kowey Date: 2008-01-24.08:23:33
On Thu, Jan 24, 2008 at 02:32:01 -0000, Mark Stosberg wrote:
>   let opts = fix_context orig_opts
>       fix_context o@(Context ('/':_):_) = o
>       fix_context (Context f:os) = Context (former_dir++"/"++f):os
>       fix_context (o:os) = o : fix_context os
>       fix_context [] = []

Hmm, darcs does have a more platform-independent is_absolute function
(Darcs.Url, I think) we could use.  Want to try plugging it in?
msg2733 (view) Author: markstos Date: 2008-01-25.01:53:08
Is there anyone on darcs-devel that could help with what looks an easy bug fix
for Windows? See the issue tracker link online for more context:

On Thu, Jan 24, 2008 at 02:32:01 -0000, Mark Stosberg wrote:
>   let opts = fix_context orig_opts
>       fix_context o@(Context ('/':_):_) = o
>       fix_context (Context f:os) = Context (former_dir++"/"++f):os
>       fix_context (o:os) = o : fix_context os
>       fix_context [] = []

Hmm, darcs does have a more platform-independent is_absolute function
(Darcs.Url, I think) we could use.  Want to try plugging it in?
msg2788 (view) Author: markstos Date: 2008-01-26.02:33:56
I see that patches were committed for this, and I just sent a regression test,
so I'm marking it resolved for now. The regression test should smoke out the
issue if it is still present.
History
Date User Action Args
2006-08-02 01:27:37keturncreate
2008-01-19 05:43:09markstossetstatus: unread -> unknown
nosy: + markstos, kowey, beschmi
messages: + msg2582
2008-01-24 02:32:01markstossetnosy: droundy, tommy, beschmi, kowey, markstos, wglozer, eivuokko, keturn
messages: + msg2712
2008-01-24 08:23:35koweysetnosy: droundy, tommy, beschmi, kowey, markstos, wglozer, eivuokko, keturn
messages: + msg2713
2008-01-25 01:53:11markstossettopic: + ProbablyEasy
nosy: + darcs-devel, rgm, jaredj
messages: + msg2733
2008-01-26 02:33:57markstossetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos, wglozer, darcs-devel, eivuokko, keturn, rgm, jaredj
messages: + msg2788
2008-08-05 23:26:22koweysetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:41:16adminsetnosy: + jast, Serware, dmitry.kurochkin, zooko, mornfall, simon, thorkilnaur, - droundy, wglozer, eivuokko, keturn, rgm, jaredj
2009-08-06 20:51:03adminsetnosy: - beschmi
2009-08-10 21:53:51adminsetnosy: + wglozer, keturn, eivuokko, rgm, jaredj, - zooko, jast, Serware, mornfall
2009-08-10 23:55:15adminsetnosy: - dagit
2009-08-25 17:54:51adminsetnosy: - simon
2009-08-27 14:01:41adminsetnosy: tommy, kowey, markstos, wglozer, darcs-devel, eivuokko, keturn, rgm, thorkilnaur, jaredj, dmitry.kurochkin
2009-10-23 22:41:40adminsetnosy: + robmoss, - rgm
2009-10-24 00:07:26adminsetnosy: + rgm, - robmoss