# HG changeset patch # User Todd Larsen # Date 1213115000 0 # Node ID 25d8f4623447bcd0396f4fbac3fbe5b17a0530b1 # Parent 9f288fee8a82c0235bb8cb41787adaa7f6903b10 Changes to address comments by Sverre about the previous commit. Patch by: Todd Larsen Review by: Sverre Rabbelier Review issue: 301 Review URL: http://codereviews.googleopensourceprograms.com/301 diff -r 9f288fee8a82 -r 25d8f4623447 scripts/svn_helper.py --- a/scripts/svn_helper.py Tue Jun 10 16:19:59 2008 +0000 +++ b/scripts/svn_helper.py Tue Jun 10 16:23:20 2008 +0000 @@ -46,11 +46,16 @@ PYSVN_FILE_DIR_NODE_KINDS = set([pysvn.node_kind.dir, pysvn.node_kind.file]) +# pysvn Client object initialized lazily the first time getPySvnClient() +# is called. _client = None def getPySvnClient(): """Returns the module-global pysvn Client object (creating one if needed). + + Lazily initializes a global pysvn Client object, returning the same one + once it exists. """ global _client @@ -95,6 +100,10 @@ def useLocalOsSep(path): """Return path with all / characters replaced with os.sep, to be OS-agnostic. + + Args: + path: an SVN path (either working copy path or relative path, but not a + full repository URL) that uses the canonical / separators """ return path.replace('/', os.sep)