~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
 
99
99
    New code should use the Commit class instead.
100
100
    """
101
 
    ## XXX: Remove this in favor of Branch.commit?
 
101
    ## XXX: Remove this in favor of WorkingTree.commit?
102
102
    Commit().commit(*args, **kwargs)
103
103
 
104
104
 
343
343
            self._emit_progress_update()
344
344
        finally:
345
345
            self._cleanup()
 
346
        return self.rev_id
346
347
 
347
348
    def _check_bound_branch(self):
348
349
        """Check to see if the local branch is bound.
385
386
        self.bound_branch = self.branch
386
387
        self.master_branch.lock_write()
387
388
        self.master_locked = True
388
 
####        
389
 
####        # Check to see if we have any pending merges. If we do
390
 
####        # those need to be pushed into the master branch
391
 
####        pending_merges = self.work_tree.pending_merges()
392
 
####        if pending_merges:
393
 
####            for revision_id in pending_merges:
394
 
####                self.master_branch.repository.fetch(self.bound_branch.repository,
395
 
####                                                    revision_id=revision_id)
396
389
 
397
390
    def _cleanup(self):
398
391
        """Cleanup any open locks, progress bars etc."""
451
444
        """Record the parents of a merge for merge detection."""
452
445
        # TODO: Make sure that this list doesn't contain duplicate 
453
446
        # entries and the order is preserved when doing this.
454
 
        pending_merges = self.work_tree.pending_merges()
455
 
        self.parents = []
 
447
        self.parents = self.work_tree.get_parent_ids()
456
448
        self.parent_invs = []
457
 
        precursor_id = self.branch.last_revision()
458
 
        if precursor_id:
459
 
            self.parents.append(precursor_id)
460
 
        self.parents += pending_merges
461
449
        for revision in self.parents:
462
450
            if self.branch.repository.has_revision(revision):
463
451
                inventory = self.branch.repository.get_inventory(revision)