Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(244)

Issue 14040043: Add backup option to convert-ly (Issue 3572) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by PhilEHolmes
Modified:
9 years, 9 months ago
Reviewers:
Ian Hulin (gmail), email, dak, Julien Rioux, mail
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

New patchset with documentation and picking up Julien's review comment.

Patch Set 1 #

Total comments: 1

Patch Set 2 : Adopts DAK's numbering syste; adds documentation #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -17 lines) Patch
M Documentation/usage/updating.itely View 1 2 chunks +10 lines, -4 lines 0 comments Download
M scripts/convert-ly.py View 1 8 chunks +23 lines, -13 lines 4 comments Download

Messages

Total messages: 17
PhilEHolmes
Initial patch to check the principle is OK. Will require documentation updates before it's pushed. ...
10 years, 6 months ago (2013-09-27 13:11:59 UTC) #1
Julien Rioux
This suggestion from David sounded like a good default: Make numbered backups for files that ...
10 years, 6 months ago (2013-09-27 19:10:19 UTC) #2
PhilEHolmes
Adopts DAK's numbering syste; adds documentation
10 years, 6 months ago (2013-09-28 11:49:45 UTC) #3
PhilEHolmes
Please review.
10 years, 6 months ago (2013-09-28 11:51:04 UTC) #4
Ian Hulin (gmail)
I'd prefer a single tilde to indicate the a backup file after the version string. ...
10 years, 6 months ago (2013-09-29 01:00:49 UTC) #5
dak
https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py File scripts/convert-ly.py (right): https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py#newcode243 scripts/convert-ly.py:243: back_up = file + '.~' + str(n) + '~' ...
10 years, 6 months ago (2013-09-29 05:46:39 UTC) #6
dak
On 2013/09/29 05:46:39, dak wrote: > https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py > The name here was chosen to correspond ...
10 years, 6 months ago (2013-09-29 06:05:56 UTC) #7
Julien Rioux
Again, can we add a check if there is already a numbered backup around? Make ...
10 years, 6 months ago (2013-09-30 10:30:35 UTC) #8
PhilEHolmes
Julien - I'm not convinced that's a good idea. It would mean that, once you'd ...
10 years, 6 months ago (2013-09-30 15:10:00 UTC) #9
dak
On 2013/09/30 15:10:00, PhilEHolmes wrote: > Julien - I'm not convinced that's a good idea. ...
10 years, 6 months ago (2013-09-30 15:29:38 UTC) #10
mail_philholmes.net
----- Original Message ----- From: <dak@gnu.org> To: <PhilEHolmes@googlemail.com>; <julien.rioux@gmail.com>; <ianhulin44@gmail.com> Cc: <reply@codereview-hr.appspotmail.com>; <lilypond-devel@gnu.org> Sent: Monday, ...
10 years, 6 months ago (2013-09-30 15:53:56 UTC) #11
dak
https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py File scripts/convert-ly.py (right): https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py#newcode241 scripts/convert-ly.py:241: while os.path.exists(back_up) and os.path.isfile(back_up): I'd do a repeat-until loop ...
10 years, 6 months ago (2013-10-04 14:24:53 UTC) #12
email_philholmes.net
----- Original Message ----- From: <dak@gnu.org> To: <PhilEHolmes@googlemail.com>; <julien.rioux@gmail.com>; <ianhulin44@gmail.com>; <mail@philholmes.net> Cc: <lilypond-devel@gnu.org>; <reply@codereview-hr.appspotmail.com> Sent: ...
10 years, 6 months ago (2013-10-04 14:41:28 UTC) #13
dak
On 2013/10/04 14:41:28, email_philholmes.net wrote: > ----- Original Message ----- > From: <mailto:dak@gnu.org> > To: ...
10 years, 6 months ago (2013-10-04 14:53:47 UTC) #14
email_philholmes.net
----- Original Message ----- From: <dak@gnu.org> To: <PhilEHolmes@googlemail.com>; <julien.rioux@gmail.com>; <ianhulin44@gmail.com>; <mail@philholmes.net>; <email@philholmes.net> Cc: <lilypond-devel@gnu.org>; <reply@codereview-hr.appspotmail.com> ...
10 years, 6 months ago (2013-10-04 15:09:48 UTC) #15
dak
On 2013/10/04 15:09:48, email_philholmes.net wrote: > > convert-ly -edn file.ly > > I'm really confused ...
10 years, 6 months ago (2013-10-04 15:47:17 UTC) #16
dak
10 years, 6 months ago (2013-10-04 16:12:45 UTC) #17
On 2013/10/04 15:47:17, dak wrote:
> On 2013/10/04 15:09:48, http://email_philholmes.net wrote:
> 
> > > convert-ly -edn file.ly
> > 
> > I'm really confused here.  -n is the option for no-version.  How is this 
> > related to backup?
> 
> Sorry, probably confused this with -b.  The rest of the comment stands.

Well, but it's wobbling.  Turns out that the while loop checks for an existing
file.ly in its first pass rather than an existing file.ly~ as I read it first. 
That should indeed be pretty harmless but is a rather unclean way to make sure
the loop runs at least once.  I'll put forward what I consider better code.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b