Index: mergebot/trunk/mergebot/svn.py
===================================================================
--- mergebot/trunk/mergebot/svn.py	(revision 60)
+++ mergebot/trunk/mergebot/svn.py	(revision 61)
@@ -31,6 +31,9 @@
         """Log the cmd string, then execute it, appending its stdout and stderr
         to logfile."""
-        open(logfile, "a").write("%s: %s\n" % (time.asctime(), cmd))
-        return os.system("(%s) >>%s 2>&1" % (cmd, logfile))
+        log = open(logfile, "a")
+        log.write("%s: %s\n" % (time.asctime(), cmd))
+        task = subprocess.Popen(cmd, stdout=log, stderr=log)
+        task.communicate()
+        return task.wait()
 
     def get_rev_from_log(self, logentry):
@@ -77,7 +80,6 @@
         """Create a branch copying from_url to to_url.  Commit as mergebot, and
         use the provided commit message."""
-        svncmd = \
-            "svn copy --username=mergebot --password=mergebot -m %s %s %s" \
-            % (shell_quote(commit_message), from_url, to_url)
+        svncmd = ['svn', 'copy', '--username=mergebot', '--password=mergebot',
+            '-m', shell_quote(commit_message), from_url, to_url]
         return self.logcmd(svncmd, logfile)
 
