[darcs-users] [patch25] Rewrite $DARCS_EMAIL documentation. [status=accepted]
kowey at darcs.net
Sat Oct 31 20:53:43 UTC 2009
On Sat, Oct 31, 2009 at 12:30:41 +0000, Trent W. Buck wrote:
> IIRC someone asked if adding comments to _darcs/prefs/email will break
> it. I thought I checked this back when I wrote this patch, but the
> reviewer should double-check this.
> Sun Sep 20 23:14:02 EST 2009 Trent W. Buck <trentbuck at gmail.com>
> * Rewrite $DARCS_EMAIL documentation.
Looks good. In my first review, I was worrying that the "#" in the
prefs file would not work, but that was a silly worry. Sorry for the
I'll be sending a stupid little patch to add some extra whitespace to
the author file between the long '#' comments and the author name.
I guess that's trivial, but I had a moment of doubt since I needed all
this explanation :-)
Rewrite $DARCS_EMAIL documentation.
> +fileHelpAuthor :: [String]
> +fileHelpAuthor = [
> + "Each patch is attributed to its author, usually by email address (for",
> + "example, `Fred Bloggs <fred at example.net>'). Darcs looks in several",
> + "places for this author string: the --author option, the files",
> + "_darcs/prefs/author (in the repository) and ~/.darcs/author (in your",
> + "home directory), and the environment variables $DARCS_EMAIL and",
> + "$EMAIL. If none of those exist, Darcs will prompt you for an author",
> + "string and write it to _darcs/prefs/author."]
> add <- askUser "What is your email address? "
> - writeFile (darcsdir++"/prefs/author") add
> + writeFile (darcsdir ++ "/prefs/author") $
> + unlines ["# " ++ line | line <- fileHelpAuthor] ++ add
This tacks on the help text as a comment below the author pref file.
I guess that's useful enough.
I've checked the implementation of get_preffile and indeed, we do ignore
the comment lines (it's the same code for dealing the boring file).
I've also done a quick little test on an example repo to make sure it
> hunk ./src/Darcs/Commands/Help.lhs 109
> -- | Help on each environment variable in which Darcs is interested.
> environmentHelp :: [([String], [String])]
> environmentHelp = [
> hunk ./src/Darcs/Commands/Help.lhs 121
> + environmentHelpEmail,
Also added to darcs help environment.
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: not available
More information about the darcs-users