~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2006-03-04 23:04:37 UTC
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: robertc@robertcollins.net-20060304230437-3c1c3098f37a39cb
Local commits do no alter or access the master branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
 
228
228
        self.weave_store = self.branch.repository.weave_store
229
229
        self.bound_branch = None
 
230
        self.local = local
230
231
        self.master_branch = None
231
232
        self.rev_id = rev_id
232
233
        self.specific_files = specific_files
240
241
            # setup the bound branch variables as needed.
241
242
            self._check_bound_branch()
242
243
 
243
 
            if not self.bound_branch and local:
244
 
                raise errors.LocalRequiresBoundBranch()
245
 
 
246
244
            # check for out of date working trees
247
245
            # if we are bound, then self.branch is the master branch and this
248
246
            # test is thus all we need.
355
353
        done using the remote branch as the target branch.
356
354
        Only at the end will the local branch be updated.
357
355
        """
358
 
        # TODO: jam 20051230 Consider a special error for the case
359
 
        #       where the local branch is bound, and can't access the
360
 
        #       master branch
361
 
        self.master_branch = self.branch.get_master_branch()
 
356
        if self.local and not self.branch.get_bound_location():
 
357
            raise errors.LocalRequiresBoundBranch()
 
358
 
 
359
        if not self.local:
 
360
            self.master_branch = self.branch.get_master_branch()
 
361
 
362
362
        if not self.master_branch:
363
363
            # make this branch the reference branch for out of date checks.
364
364
            self.master_branch = self.branch