~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Robert Collins
  • Date: 2005-10-03 02:10:02 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003021002-4bf750e1d2bf7149
move checks for versionability of file kinds into InventoryEntry

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
from bzrlib.inventory import InventoryEntry
17
18
from bzrlib.trace import mutter, note, warning
18
19
from bzrlib.errors import NotBranchError
19
20
from bzrlib.branch import Branch
95
96
 
96
97
        kind = bzrlib.osutils.file_kind(af)
97
98
 
98
 
        if kind != 'file' and kind != 'directory' and kind != 'symlink':
 
99
        if not InventoryEntry.versionable_kind(kind):
99
100
            if f in user_list:
100
101
                raise BadFileKindError("cannot add %s of type %s" % (f, kind))
101
102
            else: