~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2010-01-08 06:33:05 UTC
  • mto: This revision was merged to the branch mainline in revision 4944.
  • Revision ID: robertc@robertcollins.net-20100108063305-qxgq2t7prgp0op1j
Adjust errors.py to fix missing references to 'warn'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1627
1627
                                this_tree=self,
1628
1628
                                pb=pb,
1629
1629
                                change_reporter=change_reporter)
1630
 
                    basis_root_id = basis_tree.get_root_id()
1631
 
                    new_root_id = new_basis_tree.get_root_id()
1632
 
                    if basis_root_id != new_root_id:
1633
 
                        self.set_root_id(new_root_id)
 
1630
                    if (basis_tree.inventory.root is None and
 
1631
                        new_basis_tree.inventory.root is not None):
 
1632
                        self.set_root_id(new_basis_tree.get_root_id())
1634
1633
                finally:
1635
1634
                    pb.finished()
1636
1635
                    basis_tree.unlock()
2275
2274
            basis.lock_read()
2276
2275
            try:
2277
2276
                to_tree = self.branch.repository.revision_tree(revision)
2278
 
                to_root_id = to_tree.get_root_id()
2279
 
                if (basis.inventory.root is None
2280
 
                    or basis.inventory.root.file_id != to_root_id):
2281
 
                    self.set_root_id(to_root_id)
 
2277
                if basis.inventory.root is None:
 
2278
                    self.set_root_id(to_tree.get_root_id())
2282
2279
                    self.flush()
2283
2280
                result += merge.merge_inner(
2284
2281
                                      self.branch,