~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-13 23:06:42 UTC
  • mfrom: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100113230642-gr0vg8u3qyzz3p2b
Merge bzr.stable, bringing in bug fixes #175839, #504390

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2005-2010 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
 
                    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())
 
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)
1633
1634
                finally:
1634
1635
                    pb.finished()
1635
1636
                    basis_tree.unlock()
2274
2275
            basis.lock_read()
2275
2276
            try:
2276
2277
                to_tree = self.branch.repository.revision_tree(revision)
2277
 
                if basis.inventory.root is None:
2278
 
                    self.set_root_id(to_tree.get_root_id())
 
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)
2279
2282
                    self.flush()
2280
2283
                result += merge.merge_inner(
2281
2284
                                      self.branch,