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

Re: [PATCH] Convert hot-backup.py.in to use new svnadmin list-dblogs and list-unused-dblogs commands

From: Vladimir Berezniker <vmpn_at_tigris.org>
Date: 2003-08-27 19:49:30 CEST

cmpilato@collab.net wrote:

> Vladimir Berezniker <vmpn@tigris.org> writes:
>
<snip>
>
> If we know that logfiles always live in the db/ directory, you could
> just do:
>
> - logfile = string.strip(item)
> + logfile = os.path.basename(string.strip(item))
>
> Right?

Right.

     I felt that little extra processing was worth not having to know that logs
are stored in "db/". What I call "The less you know, the better you sleep"
principle. This way the only contract between hot-backup.py and svnadmin
list-dblogs is that the later returns list of logs paths relative to repository.

     This additional code is to compensate for the fact that returned log paths
have repository path prefixed. Which was not a part of my patch to implement
"list-dblogs" (then "lsdblogs"). It was supposed to return paths relative to
repository root so the code you mention would not be necessary.

P.S.
For those who are curious why I used the absolute path functions. This allows
the script to work regardless what format the path returned by svnadmin
list-dblogs is.

Sincerely,
Vladimir Berezniker

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 27 19:49:50 2003

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.