[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] [hot-backup.py] Allow to set the numer of backups in environment

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: 2007-10-19 18:57:13 CEST

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
> ]]]
>

So could anybody commit this patch?

-- 
Arfrever Frehtes Taifersar Arahesis

Received on Fri Oct 19 19:01:21 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.