~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to upstream_import.py

  • Committer: Aaron Bentley
  • Date: 2006-11-22 13:08:43 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20061122130843-4eaenjjvsrkk564v
Get encoding working

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