[Treepkg-commits] r3 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri May 11 14:58:29 CEST 2007
Author: bh
Date: 2007-05-11 14:58:28 +0200 (Fri, 11 May 2007)
New Revision: 3
Modified:
trunk/treepkg/subversion.py
Log:
Add revision parameter to update so that a checkout can be updated to a
specific revision
Modified: trunk/treepkg/subversion.py
===================================================================
--- trunk/treepkg/subversion.py 2007-05-03 18:31:32 UTC (rev 2)
+++ trunk/treepkg/subversion.py 2007-05-11 12:58:28 UTC (rev 3)
@@ -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"""
More information about the Treepkg-commits
mailing list