darcs

Issue 313 darcs record --logfile requires trailing newline in logfile

Title darcs record --logfile requires trailing newline in logfile
Priority wishlist Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy
Assigned To kowey
Topics ProbablyEasy

Created on 2006-10-17.13:11:34 by kowey, last changed 2009-08-27.14:11:09 by admin.

Messages
msg1113 (view) Author: kowey Date: 2006-10-17.13:11:22
darcs record --logfile requires trailing newline in logfile
Import of RT #532

"Stephen J. Turnbull" <stephen@xemacs.org> 2005-10-01
-----------------------------------------------------
Subject: darcs record --logfile requires trailing newline in logfile

If there isn't one, the separator text ends up appended to the
incomplete last line, and darcs doesn't recognize the separator. So the
whole file (including the file list and so on) gets used as the changelog.

Emacs will very easily produce such a file, as will scripts using
printf-like functions to append to the file.
msg1114 (view) Author: kowey Date: 2006-10-17.13:18:19
In darcs 1.0.8:

$ darcs init
$ touch a
$ darcs add a
$ echo -n hello > world
$ darcs record -a --logfile world 
Finished recording patch 'hello***END OF DESCRIPTION***'

It seems fair to require that darcs insert a newline to the end of a logfile
description if there isn't one... is it?

Note also that a related thing happens in regular record, where darcs does not
recognise strings like 'foo ***END OF DESCRIPTION***', but this is arguably less
of a problem or even a non-problem.
History
Date User Action Args
2006-10-17 13:11:34koweycreate
2006-10-17 13:18:26koweysetstatus: unread -> unknown
nosy: droundy, tommy, kowey
messages: + msg1114
2006-10-17 13:20:18koweysettopic: + ProbablyEasy
nosy: droundy, tommy, kowey
2007-07-23 14:10:28koweysettopic: - FromRequestTracker
nosy: + beschmi
2007-07-23 14:10:39koweysetstatus: unknown -> has-patch
2007-07-31 17:56:31koweysetstatus: has-patch -> resolved-in-stable
2008-09-16 21:30:30adminsetstatus: resolved-in-stable -> resolved
nosy: + dagit
2009-08-06 17:41:20adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy
2009-08-06 20:38:29adminsetnosy: - beschmi
2009-08-10 21:57:30adminsetnosy: - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:57:10adminsetnosy: - dagit
2009-08-25 17:54:55adminsetnosy: + darcs-devel, - simon
2009-08-27 14:11:09adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, dmitry.kurochkin