~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

Merge from Robert [Fails tests]

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
from bzrlib.delta import compare_trees
 
18
from bzrlib.errors import BzrError
17
19
from bzrlib.trace import mutter
18
 
from bzrlib.errors import BzrError
19
 
from bzrlib.delta import compare_trees
20
20
 
21
21
# TODO: Rather than building a changeset object, we should probably
22
22
# invoke callbacks on an object.  That object can either accumulate a
159
159
        output = sys.stdout
160
160
 
161
161
    if from_spec is None:
 
162
        old_tree = b.bzrdir.open_workingtree()
162
163
        if b2 is None:
163
 
            old_tree = b.basis_tree()
164
 
        else:
165
 
            old_tree = b.working_tree()
 
164
            old_tree = old_tree = old_tree.basis_tree()
166
165
    else:
167
166
        old_tree = b.repository.revision_tree(from_spec.in_history(b).rev_id)
168
167
 
169
168
    if revision2 is None:
170
169
        if b2 is None:
171
 
            new_tree = b.working_tree()
 
170
            new_tree = b.bzrdir.open_workingtree()
172
171
        else:
173
 
            new_tree = b2.working_tree()
 
172
            new_tree = b2.bzrdir.open_workingtree()
174
173
    else:
175
174
        new_tree = b.repository.revision_tree(revision2.in_history(b).rev_id)
176
175