/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2006-03-04 22:35:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: robertc@robertcollins.net-20060304223519-51db134273f7a5a1
Local commits on unbound branches fail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1388
1388
                     Option('strict',
1389
1389
                            help="refuse to commit if there are unknown "
1390
1390
                            "files in the working tree."),
 
1391
                     Option('local',
 
1392
                            help="perform a local only commit in a bound "
 
1393
                                 "branch. Such commits are not pushed to "
 
1394
                                 "the master branch until a normal commit "
 
1395
                                 "is performed."
 
1396
                            ),
1391
1397
                     ]
1392
1398
    aliases = ['ci', 'checkin']
1393
1399
 
1394
1400
    def run(self, message=None, file=None, verbose=True, selected_list=None,
1395
 
            unchanged=False, strict=False):
 
1401
            unchanged=False, strict=False, local=False):
1396
1402
        from bzrlib.errors import (PointlessCommit, ConflictsInTree,
1397
1403
                StrictCommitFailed)
1398
1404
        from bzrlib.msgeditor import edit_commit_message, \
1409
1415
        # TODO: if the commit *does* happen to fail, then save the commit 
1410
1416
        # message to a temporary file where it can be recovered
1411
1417
        tree, selected_list = tree_files(selected_list)
 
1418
        if local and not tree.branch.get_bound_location():
 
1419
            raise errors.LocalRequiresBoundBranch()
1412
1420
        if message is None and not file:
1413
1421
            template = make_commit_message_template(tree, selected_list)
1414
1422
            message = edit_commit_message(template)