comparison treepkg/subversion.py @ 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 81ba86662cbd
children 97fd2584df5f
comparison
equal deleted inserted replaced
265:9c0131d2e0e1 266:e201ea1f6d0e
39 args.extend(["--revision", revision]) 39 args.extend(["--revision", revision])
40 if not recurse: 40 if not recurse:
41 args.append("-N") 41 args.append("-N")
42 run.call(cmdexpand("svn update -q @args $localdir", **locals())) 42 run.call(cmdexpand("svn update -q @args $localdir", **locals()))
43 43
44 def export(src, dest): 44 def export(src, dest, revision=None, recurse=True):
45 """Runs svn export src dest""" 45 """Runs svn export src dest"""
46 run.call(cmdexpand("svn export -q $src $dest", **locals())) 46 args = []
47 if revision:
48 args.extend(["--revision", revision])
49 if not recurse:
50 args.append("-N")
51 run.call(cmdexpand("svn export -q @args $src $dest", **locals()))
47 52
48 def last_changed_revision(svn_working_copy): 53 def last_changed_revision(svn_working_copy):
49 """return the last changed revision of an SVN working copy as an int""" 54 """return the last changed revision of an SVN working copy as an int"""
50 # Make sure we run svn under the C locale to avoid localized 55 # Make sure we run svn under the C locale to avoid localized
51 # messages 56 # messages
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)