[darcs-users] 1.0.8 / 1.0.6 interop errors?
Eric Y. Kow
eric.kow at gmail.com
Sun Jul 9 13:21:36 UTC 2006
On Sun, Jul 09, 2006 at 08:44:07 -0400, David Roundy wrote:
> > I wonder if it would be super-ugly for us to make a wrapper script
> > that calls cygpath on all arguments. Or if there exists a library
> > version or something that we could invoke via FFI.
>
> Indeed, that would be a reasonable approach. We'd just need something
> like a "work around cygwin" flag to control this behavior?
grepping the source code shows
gitlib.c:#ifdef __CYGWIN__
I'm guessing this flag is set when compiling against cygwin
So here's what I propose as a set of actions a Windows developer
might undertake (any volunteers?)
Plan A
------
1. Determine if the cygwin lib exposes the path handling bits
used to make Windows and cygpaths transparant (as Olivier
mentions). Is it a black box, or can we just invoke the
stuff ourselves?
2. If we can invoke it ourselves, write an FFI wrapper for
said functions
Plan B
------
1. Look at the Cygpath C++ source: http://tinyurl.com/famkm
2. Reimplement in 3 lines of Haskell or less :-)
Plans A+B
---------
3. Provide a function
windowsToUnixPath :: FilePath -> FilePath
that translates filepaths like "Z:\Program Files\Foo\Bar"
into /cygpath/z/foo/bar
4. Wrap the relevant SSH functions with something like
#ifdef __CYGWIN
paths = map windowsToUnixPath paths_
#else
paths = paths_
#endif
Does this sound right? Any takers?
--
Eric Kow http://www.loria.fr/~kow
PGP Key ID: 08AC04F9 Merci de corriger mon français.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20060709/4f0ad4ee/attachment.pgp
More information about the darcs-users
mailing list