Monday, December 08, 2008

TeamCity checkout rules

In team city Version Control Settings you can include/exclude the path for checkout.
Here are a few examples:
  • I want to checkout only the directories:/project1/testing/watirtests, and /project1/ant, but not anything else under project1:

  • I want to checkout everything but derectories:/project1/testing/watirtests, and /project1/ant:

Monday, December 01, 2008

Python recursive generator to find all the files in a directory

Just for exercise, I programed the following transverse_directory function in python to find out all the files in a directory tree in python, while trying the google treasure hunt - zip:

def transverse_directory(path):
if os.path.isdir(path):
for item in os.listdir(path):
item_path = os.path.abspath(path) + os.sep + item
for file in tranverse_directory(item_path):
yield file
yield path