~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-11 10:05:33 UTC
  • mfrom: (1185.50.95 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060511100533-e3d066b362716fe2
(jam) update web page url to http://bazaar-vcs.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib.inventory import InventoryEntry
21
21
from bzrlib.trace import mutter, note, warning
22
22
from bzrlib.errors import NotBranchError
23
 
from bzrlib.branch import is_control_file
 
23
from bzrlib.workingtree import is_control_file
24
24
import bzrlib.osutils
25
25
from bzrlib.workingtree import WorkingTree
26
26
 
123
123
 
124
124
        mutter("smart add of %r, abs=%r", f, af)
125
125
        
126
 
        if is_control_file(af):
 
126
        if tree.is_control_filename(af):
127
127
            raise ForbiddenFileError('cannot add control file %s' % f)
128
128
            
129
129
        versioned = (inv.path2id(rf) != None)
130
130
 
131
131
        if kind == 'directory':
132
132
            try:
133
 
                sub_branch = WorkingTree(af)
 
133
                sub_branch = WorkingTree.open(af)
134
134
                sub_tree = True
135
135
            except NotBranchError:
136
136
                sub_tree = False
152
152
        if kind == 'directory' and recurse and not sub_tree:
153
153
            for subf in os.listdir(af):
154
154
                subp = bzrlib.osutils.pathjoin(rf, subf)
155
 
                if subf == bzrlib.BZRDIR:
 
155
                if tree.is_control_filename(subp):
156
156
                    mutter("skip control directory %r", subp)
157
157
                else:
158
158
                    ignore_glob = tree.is_ignored(subp)