2007-10-12 15:43:48 Arfrever Frehtes Taifersar Arahesis napisał(a):
> 2007-10-12 15:31:58 C. Michael Pilato napisał(a):
> > Arfrever Frehtes Taifersar Arahesis wrote:
> > > I think that hot-backup.py could check an environmental variable and if it's
> > > available, then the value retrieved from this variable could be used instead
> > > of hard coded value.
> > >
> > > [[[
> > > Allow to set in environment the numer of backups kept around by hot-backup.py.
> > >
> > > * tools/backup/hot-backup.py.in: Set num_backups to value obtained from
> > > SVN_HOTBACKUP_BACKUPS_NUMBER environmental variable.
> > >
> > > Patch by: arfrever
> > > ]]]
> > >
> > >
> > >
> > > ------------------------------------------------------------------------
> > >
> > > Index: tools/backup/hot-backup.py.in
> > > ===================================================================
> > > --- tools/backup/hot-backup.py.in (revision 27145)
> > > +++ tools/backup/hot-backup.py.in (working copy)
> > > @@ -53,7 +53,10 @@
> > > svnadmin = r"@SVN_BINDIR@/svnadmin"
> > >
> > > # Number of backups to keep around (0 for "keep them all")
> > > -num_backups = 64
> > > +if os.environ.has_key("SVN_HOTBACKUP_BACKUPS_NUMBER"):
> > > + num_backups = int(os.environ["SVN_HOTBACKUP_BACKUPS_NUMBER"])
> > > +else:
> > > + num_backups = 64
> > >
> > > # Archive types/extensions
> > > archive_map = {
> >
> > The more-typical way of doing this is:
> >
> > num_backups = int(os.environ.get("SVN_HOTBACKUP_BACKUPS_NUMBER", 64))
>
> Thanks for suggestion!
>
> [[[
> Allow to set in environment the numer of backups kept around by hot-backup.py.
>
> * tools/backup/hot-backup.py.in: Set num_backups to value obtained from
> SVN_HOTBACKUP_BACKUPS_NUMBER environmental variable.
>
> Patch by: arfrever
> cmpilato
> ]]]
>
Can I commit this patch?
--
Arfrever Frehtes Taifersar Arahesis
Received on Mon Oct 22 05:12:42 2007