changeset 79:570ac81865be

Add revision parameter to update so that a checkout can be updated to a specific revision
author Bernhard Herzog <bh@intevation.de>
date Fri, 11 May 2007 12:58:28 +0000
parents 9a602d8eaa60
children 0af2fa3790e0
files treepkg/subversion.py
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/subversion.py	Tue Apr 24 17:13:43 2012 +0200
+++ b/treepkg/subversion.py	Fri May 11 12:58:28 2007 +0000
@@ -18,9 +18,16 @@
     """Runs svn to checkout the repository at url into the localdir"""
     run.call(cmdexpand("svn checkout -q $url $localdir", **locals()))
 
-def update(localdir):
-    """Runs svn update on the localdir"""
-    run.call(cmdexpand("svn update -q $localdir", **locals()))
+def update(localdir, revision=None):
+    """Runs svn update on the localdir.
+    The parameter revision, if given, is passed to svn as the value of
+    the --revision option.
+    """
+    if revision:
+        revision = ["--revision", revision]
+    else:
+        revision = []
+    run.call(cmdexpand("svn update -q @revision $localdir", **locals()))
 
 def export(src, dest):
     """Runs svn export src dest"""
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)