def add( path ): addCmd = "cvs add %s" % path vprint("Adding: " + addCmd, 2) process = run_cmd(addCmd) errors = process.stderr.readlines() vprint("%s" % string.join( errors, '' ), 1) return True
def commit(files, msg): if isinstance(files, types.StringType): files = [files] elif not isinstance(files, type([])): raise TypeError("The commit procedure accepts argument of type string of" "array of string: type (%s) is not valid.\n" % type(files)) commit_cmd = ("cvs commit -m '" + msg + "' ") for f in files: commit_cmd += f + " " vprint("\n+++ Commiting (from "+ os.getcwd() +"):\n" + commit_cmd, 1) commit_process = run_cmd(commit_cmd) errors = commit_process.stderr.readlines() vprint("%s" % string.join( errors, '' ), 1)
def recursive_remove(path, options=""): rm_cmd = "cvs remove -Rf " + path vprint("Removing: " + rm_cmd, 2) os.system( rm_cmd ) return True