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

[PATCH] hot-backup.py.in

From: <chars_at_xs4all.nl>
Date: 2005-03-16 22:43:10 CET

I built 1.1.3 from source on RedHat 7.2.
I know we should update to a recent distro, but I try not to show too much
competence as a sysadmin here. At my last job, I spent the morning doing
sysadmin jobs, and the afternoon defending why my developing deadlines
weren't met ;)

Python version installed is Python 1.5.2

tools/backup/hot-backup.py breaks because os.popen3 is unknown.
I tried fixing it. popen3 does exist in this Python, but somewhere else and
with a slightly different returnvalue.

try:
  dir(os.popen3)
except AttributeError:
  import popen2

  def popen3fix(cmd):
    outfile, infile, errfile = popen2.popen3(cmd)
    return infile, outfile, errfile

  os.popen3 = popen3fix

But then it breaks on os.spawnl, which is new in Python 1.6
I stopped trying there and updated to Python 2.2 and changed the shabang to
use Python2. Which does work.
Maybe with the mentioned code as "Step 0" it will work on Python 1.6
I don't know that.

A test case for this patch seems fairly simple, if you'd like one I'll fix
one. Just mail me, I don't read the mailinglist (yet).

--- subversion-1.1.3/tools/backup/hot-backup.py.in Tue Dec 16 17:41:14 2003
+++ work-subversion-1.1.3/tools/backup/hot-backup.py.in Wed Mar 16
23:39:22 2005
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # hot-backup.py: perform a "hot" backup of a Berkeley DB repository.
 # (and clean old logfiles after backup completes.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 17 03:22:45 2005

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.