changeset 266:e201ea1f6d0e

Add revision and recurse parameters to treepkg.subversion.export
author Bernhard Herzog <bh@intevation.de>
date Thu, 30 Apr 2009 10:21:01 +0000
parents 9c0131d2e0e1
children fdee17d71778
files treepkg/subversion.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/subversion.py	Wed Apr 29 16:53:00 2009 +0000
+++ b/treepkg/subversion.py	Thu Apr 30 10:21:01 2009 +0000
@@ -41,9 +41,14 @@
         args.append("-N")
     run.call(cmdexpand("svn update -q @args $localdir", **locals()))
 
-def export(src, dest):
+def export(src, dest, revision=None, recurse=True):
     """Runs svn export src dest"""
-    run.call(cmdexpand("svn export -q $src $dest", **locals()))
+    args = []
+    if revision:
+        args.extend(["--revision", revision])
+    if not recurse:
+        args.append("-N")
+    run.call(cmdexpand("svn export -q @args $src $dest", **locals()))
 
 def last_changed_revision(svn_working_copy):
     """return the last changed revision of an SVN working copy as an int"""
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)