16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
20
from bzrlib.errors import NoSuchFile
25
23
PathPrefixNotCreated, NoLocationKnown,
26
24
DivergedBranchesError)
28
def commit(selected_list, message=None, unchanged=False,
29
strict=False, local=False):
30
""" Command to commit changes into the branch.
32
:param selected_list: list of files you want to commit (at least the top working directory has to be specified)
34
:param message: commit message
36
:param file: the file which contains the commit message
38
:param unchanged: force commit if nothing has changed since the last commit
40
:param strict: refuse to commit if there are unknown files in the working tree
42
:param local: perform a local only commit in a bound branch
44
from bzrlib.builtins import tree_files
45
from bzrlib.commit import NullCommitReporter
47
tree, selected_list = tree_files(selected_list)
49
if local and not tree.branch.get_bound_location():
50
raise LocalRequiresBoundBranch
52
assert message is not None and len(message) > 0
54
# FIXME: This should be a GtkCommitReporter!
55
reporter = NullCommitReporter()
57
tree.commit(message, specific_files=selected_list,
58
allow_pointless=unchanged, strict=strict, local=local,
61
26
def push(branch, location=None, remember=False, overwrite=False,
62
27
create_prefix=False):
63
28
""" Update a mirror of a branch.