/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/workingtree.py

  • Committer: Shannon Weyrick
  • Date: 2011-11-11 01:03:17 UTC
  • mfrom: (6255 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111111010317-j3z80ooe12rfcc0s
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
522
522
            # TODO now merge from tree.last_revision to revision (to preserve
523
523
            # user local changes)
524
524
            merge.transform_tree(tree, self)
525
 
            tree.set_parent_ids([revision_id])
 
525
            if revision_id == _mod_revision.NULL_REVISION:
 
526
                new_parents = []
 
527
            else:
 
528
                new_parents = [revision_id]
 
529
            tree.set_parent_ids(new_parents)
526
530
 
527
531
    def id2abspath(self, file_id):
528
532
        return self.abspath(self.id2path(file_id))
1004
1008
                                show_base=show_base)
1005
1009
                    basis_root_id = basis_tree.get_root_id()
1006
1010
                    new_root_id = new_basis_tree.get_root_id()
1007
 
                    if basis_root_id != new_root_id:
 
1011
                    if new_root_id is not None and basis_root_id != new_root_id:
1008
1012
                        self.set_root_id(new_root_id)
1009
1013
                finally:
1010
1014
                    basis_tree.unlock()
1011
1015
                # TODO - dedup parents list with things merged by pull ?
1012
1016
                # reuse the revisiontree we merged against to set the new
1013
1017
                # tree data.
1014
 
                parent_trees = [(self.branch.last_revision(), new_basis_tree)]
 
1018
                parent_trees = []
 
1019
                if self.branch.last_revision() != _mod_revision.NULL_REVISION:
 
1020
                    parent_trees.append(
 
1021
                        (self.branch.last_revision(), new_basis_tree))
1015
1022
                # we have to pull the merge trees out again, because
1016
1023
                # merge_inner has set the ids. - this corner is not yet
1017
1024
                # layered well enough to prevent double handling.