~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
            return False
83
83
        opt_name = 'add.maximum_file_size'
84
84
        if self._maxSize is None:
85
 
            config = tree.get_config_stack()
 
85
            # FIXME: We use the branch config as there is no tree config
 
86
            # -- vila 2011-12-16
 
87
            config = tree.branch.get_config_stack()
86
88
            self._maxSize = config.get(opt_name)
87
89
        if stat_value is None:
88
90
            file_size = os.path.getsize(path);
127
129
        we look for a file with the same name in that directory.
128
130
        Else, we look for an entry in the base tree with the same path.
129
131
        """
 
132
 
130
133
        if self.base_tree.has_id(parent_ie.file_id):
131
 
            base_path = osutils.pathjoin(
132
 
                self.base_tree.id2path(parent_ie.file_id),
 
134
            base_parent_ie = self.base_tree.inventory[parent_ie.file_id]
 
135
            base_child_ie = base_parent_ie.children.get(
133
136
                osutils.basename(path))
134
 
            base_id = self.base_tree.path2id(base_path)
135
 
            if base_id is not None:
136
 
                return (base_id, base_path)
 
137
            if base_child_ie is not None:
 
138
                return (base_child_ie.file_id,
 
139
                        self.base_tree.id2path(base_child_ie.file_id))
137
140
        full_base_path = osutils.pathjoin(self.base_path, path)
138
141
        # This may return None, but it is our last attempt
139
142
        return self.base_tree.path2id(full_base_path), full_base_path