/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

merge bzr.dev.

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 (
55
57
    sha_file,
56
58
    splitpath,
57
59
    supports_executable,
58
 
)
 
60
    )
59
61
from bzrlib.progress import ProgressPhase
60
62
from bzrlib.symbol_versioning import (
61
 
        deprecated_function,
62
 
        deprecated_in,
63
 
        deprecated_method,
64
 
        )
 
63
    deprecated_function,
 
64
    deprecated_in,
 
65
    deprecated_method,
 
66
    )
65
67
from bzrlib.trace import warning
66
 
from bzrlib import tree
67
68
 
68
69
 
69
70
ROOT_PARENT = "root-parent"
526
527
        for trans_id in self._removed_id:
527
528
            file_id = self.tree_file_id(trans_id)
528
529
            if file_id is not None:
 
530
                # XXX: This seems like something that should go via a different
 
531
                #      indirection.
529
532
                if self._tree.inventory[file_id].kind == 'directory':
530
533
                    parents.append(trans_id)
531
534
            elif self.tree_kind(trans_id) == 'directory':
3018
3021
            file_id = tt.inactive_file_id(conflict[1])
3019
3022
            # special-case the other tree root (move its children instead)
3020
3023
            if path_tree and file_id in path_tree:
3021
 
                if path_tree.inventory[file_id].parent_id is None:
 
3024
                if path_tree.path2id('') == file_id:
 
3025
                    # This is the root entry, skip it
3022
3026
                    continue
3023
3027
            tt.version_file(file_id, conflict[1])
3024
3028
            new_conflicts.add((c_type, 'Versioned directory', conflict[1]))