Version control system wrapper allowing the developer to worry about only having to learn one command set to manage all types of repositories.

add.py 645B

    from utilities import execute, isGit, isMercurial, isBazaar def add(arguments): ''' Add file(s) to the pending changes. ''' if isGit(): # If no additional arguments were passed assume # we want to add all pending changes. if len(arguments) == 0: arguments.append(".") command = ["git", "add"] command.extend(arguments) execute(command) if isMercurial(): command = ["hg", "add"] command.extend(arguments) execute(command) if isBazaar(): command = ["bzr", "add"] command.extend(arguments) execute(command)