Assuming a directory structure on an SVN server that looks similar to this:
/ mainfolder
../ subfolder1
-big-file1.xlm
-small-file1.txt
../ subfolder2
-big-file2.xlm
-small-file2.txt
With a checkout function in a Python script that looks like this:
client = pysvn.Client()
client.callback_get_login = svnlogin
try:
client.checkout(svnurl()+"/mainfolder",
'./examples/pysvntest')
print("done")
except pysvn.ClientError as e:
print("SVN Error occured: ", e)
How do I limit the function to only checkout small-file's?
Could be by filetype, by file size (or another smart way)
You can find the file paths you need to get, by using
client.ls()(orclient.list()) and then filter the results. Note that you cannot checkout individual files, so you need to useclient.export()orclient.cat().The following code should give you a a place to start: