changeset 452:3e76acd5563b

Applied modified version of patch for #173. Thanks, Mike!
author cmlenz
date Thu, 30 Aug 2007 08:27:18 +0000
parents 57822fefd441
children e0b5a76359da
files bitten/build/svntools.py
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/build/svntools.py
+++ b/bitten/build/svntools.py
@@ -17,7 +17,7 @@
 
 __docformat__ = 'restructuredtext en'
 
-def checkout(ctxt, url, path=None, revision=None):
+def checkout(ctxt, url, path=None, revision=None, dir_='.'):
     """Perform a checkout from a Subversion repository.
     
     :param ctxt: the build context
@@ -25,20 +25,21 @@
     :param url: the URL of the repository
     :param path: the path inside the repository
     :param revision: the revision to check out
+    :param dir_: the name of a local subdirectory to check out into
     """
     args = ['checkout']
     if revision:
         args += ['-r', revision]
     if path:
         url = posixpath.join(url, path)
-    args += [url, '.']
+    args += [url, dir_]
 
     from bitten.build import shtools
     returncode = shtools.execute(ctxt, file_='svn', args=args)
     if returncode != 0:
         ctxt.error('svn checkout failed (%s)' % returncode)
 
-def export(ctxt, url, path=None, revision=None):
+def export(ctxt, url, path=None, revision=None, dir_='.'):
     """Perform an export from a Subversion repository.
     
     :param ctxt: the build context
@@ -46,29 +47,32 @@
     :param url: the URL of the repository
     :param path: the path inside the repository
     :param revision: the revision to check out
+    :param dir_: the name of a local subdirectory to export out into
     """
     args = ['export', '--force']
     if revision:
         args += ['-r', revision]
     if path:
         url = posixpath.join(url, path)
-    args += [url, '.']
+    args += [url, dir_]
 
     from bitten.build import shtools
     returncode = shtools.execute(ctxt, file_='svn', args=args)
     if returncode != 0:
         ctxt.error('svn export failed (%s)' % returncode)
 
-def update(ctxt, revision=None):
+def update(ctxt, revision=None, dir_='.'):
     """Update the local working copy from the Subversion repository.
     
     :param ctxt: the build context
     :type ctxt: `Context`
     :param revision: the revision to check out
+    :param dir_: the name of a local subdirectory containing the working copy
     """
     args = ['update']
     if revision:
         args += ['-r', revision]
+    args += [dir_]
 
     from bitten.build import shtools
     returncode = shtools.execute(ctxt, file_='svn', args=args)
Copyright (C) 2012-2017 Edgewall Software