Re: [eclipsedarcs-develop] Fix for Flyspray #11
Status: Alpha
Brought to you by:
radoslawg
|
From: <rad...@gm...> - 2007-03-18 10:10:11
|
> > darcs record > --repodir=/home/radekg/private/runtime-EclipseApplication/TestProject > > --all --patch-name=Name with space --skip-long-comment aaaaaaa.java > > > > and it worked. So it seems quotes are not necsessary. > Perfect timing - as it happens, I have just written up a basic tutorial on > handling command line options in Haskell. (Will post it to my blog during > the next few hours.) So I don't know for sure, but I have an idea why this > works. > > The getOpts mechanism in Haskell (which is presumably used by Darcs) > recognizes options when they start, as usual, with a single or double dash. > It may well be that the entire part between --patch-name and > --skip-long-comment is just recognized as a single string and passed to the > program as argument to --patch-name. The mechanism can know this because > there is a defined option (namely, --skip-long-comment) after it, so it is > known where the string ends. If, on the other hand, --patch-name were the > last argument, then it would look as if only the first word, i.e. 'Name' is > an argument to --patch-name, and the rest are individual other options. That would be perfect explanation except it does not work from command line. :) So I assume this different kind of magic. Invocation from command line gives: $ darcs record --repodir=/home/radekg/private/runtime-EclipseApplication/TestProject --all --patch-name=Name with space --skip-long-comment aaaaaaa.java Recording changes in "aaaaaaa.java": Non existent files or directories: "space" "with" Cheers! Radek. |