/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/workingtree.py

Move Branch.unknowns() to WorkingTree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
497
497
        for f in descend('', inv.root.file_id, self.basedir):
498
498
            yield f
499
499
            
500
 
 
501
 
 
502
500
    def unknowns(self):
 
501
        """Return all unknown files.
 
502
 
 
503
        These are files in the working directory that are not versioned or
 
504
        control files or ignored.
 
505
        
 
506
        >>> from bzrlib.branch import ScratchBranch
 
507
        >>> b = ScratchBranch(files=['foo', 'foo~'])
 
508
        >>> tree = WorkingTree(b.base, b)
 
509
        >>> map(str, tree.unknowns())
 
510
        ['foo']
 
511
        >>> tree.add('foo')
 
512
        >>> list(b.unknowns())
 
513
        []
 
514
        >>> tree.remove('foo')
 
515
        >>> list(b.unknowns())
 
516
        [u'foo']
 
517
        """
503
518
        for subp in self.extras():
504
519
            if not self.is_ignored(subp):
505
520
                yield subp