All pastes #356719 Raw Edit

Something

public text v1 · immutable
·published 2007-02-15 06:46 UTC
rendered paste body
#!/usr/bin/env python
import sys
import os

def UpdateRCS(dir):
	basedir = dir
	subdirlist = []
	repos = 0
	print ">>>> Updating RCS repos.\n"
	for item in os.listdir(dir):
		if os.path.isdir(item):
			for files in os.listdir(item):
				if '.svn' in files:
					print ">> Updating", item, "\n"
					print os.execv(item, "svn up")
					print ">> ", item, " updated\n"
				if '.git' in files:
					print ">> Updating", item, "\n"
					os.execv(item, "git pull")
					print ">> ", item, " updated \n"
				if '.bzr' in files:
					print ">> Updating", item, "\n"
					os.execv(item, "bzr pull")
					print ">> ", item, " updated\n"
	print ">>>> RCS repos updated."


startdir = "."
UpdateRCS(startdir)