----- Original Message -----
From: <d...@gnu.org>
To: <philehol...@googlemail.com>; <julien.ri...@gmail.com>;
<ianhuli...@gmail.com>; <m...@philholmes.net>; <em...@philholmes.net>
Cc: <lilypond-devel@gnu.org>; <re...@codereview-hr.appspotmail.com>
Sent: Friday, October 04, 2013 3:53 PM
Subject: Re: Add backup option to convert-ly (Issue 3572) (issue 14040043)
> With the current code, if there is no file~, the backup file will
always
> (even in the presence of -n) be called file~, but file~ is much more
> prone to overwriting accidentally than file.~1~ not least of all by
> convert-ly (when called without -n option at a later point of time)
> itself.
Well, that's the whole point of this patch. Without this new code,
the
backup is always over-written. With it, using the -b option prevents
over-writing.
No, it doesn't.
If I have one particularly important revision and no previous backup
file, and I very much want to preserve the particularly important
revision, let's assume that I do
convert-ly -edn file.ly
I'm really confused here. -n is the option for no-version. How is this
related to backup?
once, and do future calls to convert-ly only via
convert-ly -ed file.ly
Does that mean that the important revision will be preserved? No, it
will get overwritten by the future calls of convert-ly -ed because when
_no_ previous backup file is present, the first "numbered" backup will
be named "file.ly~" rather than "file.ly.~1~".
And I think that's a mistake.
And while we are at it: the loop has the condition
while os.path.exists(back_up) and os.path.isfile(back_up):
for skipping over existing files. The second part of the condition is
nonsensical since it means that a name will be used for backing up even
if it is already taken by a directory or fifo or socket.
https://codereview.appspot.com/14040043/
I presume Eluze put it in for a specific reason which I don't know. Eluze?
--
Phil Holmes
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel