1234567891011121314151617181920212223242526272829303132333435 |
- import subprocess
- from utilities import isGit, isMercurial, isBazaar
- def add(arguments):
- '''
- Add file(s) to the pending changes.
- '''
-
- if isGit():
-
-
- if len(arguments) == 0:
- arguments.append(".")
- command = ["git", "add"]
- command.extend(arguments)
- executeCommand(command)
- if isMercurial():
- command = ["hg", "add"]
- command.extend(arguments)
- executeCommand(command)
- if isBazaar():
- command = ["bzr", "add"]
- command.extend(arguments)
- executeCommand(command)
- def executeCommand(command):
- '''
- Execute the given command.
- '''
- subprocess.call(command)
|