~ubuntu-branches/ubuntu/lucid/bzr/lucid-proposed

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeff Bailey
  • Date: 2006-03-20 08:31:00 UTC
  • mfrom: (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060320083100-ovdi2ssuw0epcx8s
Tags: 0.8~200603200831-0ubuntu1
* Snapshot uploaded to Dapper at Martin Pool's request.

* Disable testsuite for upload.  Fakeroot and the testsuite don't
  play along.

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)