~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to upstream_import.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-18 20:37:53 UTC
  • mto: This revision was merged to the branch mainline in revision 421.
  • Revision ID: bialix@ukr.net-20060718203753-fa30c2f3cc59316b
don't use curses on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
from unittest import makeSuite
10
10
 
11
11
from bzrlib.bzrdir import BzrDir
 
12
from bzrlib.delta import compare_trees
12
13
from bzrlib.errors import NoSuchFile, BzrCommandError, NotBranchError
13
14
from bzrlib.osutils import pathjoin, isdir, file_iterator
14
15
from bzrlib.tests import TestCaseInTempDir
73
74
 
74
75
    removed = set()
75
76
    for path, entry in tree.inventory.iter_entries():
76
 
        if entry.parent_id is None:
77
 
            continue
78
77
        trans_id = tt.trans_id_tree_path(path)
79
78
        tt.delete_contents(trans_id)
80
79
        removed.add(path)
144
143
        tree = WorkingTree.open_containing('.')[0]
145
144
    tree.lock_write()
146
145
    try:
147
 
        if tree.changes_from(tree.basis_tree()).has_changed():
 
146
        if compare_trees(tree, tree.basis_tree()).has_changed():
148
147
            raise BzrCommandError("Working tree has uncommitted changes.")
149
148
 
150
149
        if (source.endswith('.tar') or source.endswith('.tar.gz') or