~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Merge fetch-spec-everything-not-in-other.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 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
19
19
from stat import S_ISREG, S_IEXEC
20
20
import time
21
21
 
 
22
import bzrlib
22
23
from bzrlib import (
23
24
    errors,
24
25
    lazy_import,
25
26
    registry,
 
27
    tree,
26
28
    )
27
29
lazy_import.lazy_import(globals(), """
28
30
from bzrlib import (
50
52
    delete_any,
51
53
    file_kind,
52
54
    has_symlinks,
53
 
    lexists,
54
55
    pathjoin,
55
56
    sha_file,
56
57
    splitpath,
57
58
    supports_executable,
58
 
)
 
59
    )
59
60
from bzrlib.progress import ProgressPhase
60
61
from bzrlib.symbol_versioning import (
61
 
        deprecated_function,
62
 
        deprecated_in,
63
 
        deprecated_method,
64
 
        )
65
 
from bzrlib.trace import mutter, warning
66
 
from bzrlib import tree
 
62
    deprecated_function,
 
63
    deprecated_in,
 
64
    deprecated_method,
 
65
    )
 
66
from bzrlib.trace import warning
67
67
import bzrlib.ui
68
68
import bzrlib.urlutils as urlutils
69
69
 
528
528
        for trans_id in self._removed_id:
529
529
            file_id = self.tree_file_id(trans_id)
530
530
            if file_id is not None:
 
531
                # XXX: This seems like something that should go via a different
 
532
                #      indirection.
531
533
                if self._tree.inventory[file_id].kind == 'directory':
532
534
                    parents.append(trans_id)
533
535
            elif self.tree_kind(trans_id) == 'directory':
3020
3022
            file_id = tt.inactive_file_id(conflict[1])
3021
3023
            # special-case the other tree root (move its children instead)
3022
3024
            if path_tree and file_id in path_tree:
3023
 
                if path_tree.inventory[file_id].parent_id is None:
 
3025
                if path_tree.path2id('') == file_id:
 
3026
                    # This is the root entry, skip it
3024
3027
                    continue
3025
3028
            tt.version_file(file_id, conflict[1])
3026
3029
            new_conflicts.add((c_type, 'Versioned directory', conflict[1]))