~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Robert Collins
  • Date: 2005-08-23 06:52:09 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050823065209-81cd5962c401751b
move io redirection into each test case from the global runner

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
 
import os, sys
18
 
import bzrlib
19
 
 
20
17
from trace import mutter, note
21
18
 
22
19
def glob_expand_for_win32(file_list):
40
37
    This is designed more towards DWIM for humans than API simplicity.
41
38
    For the specific behaviour see the help for cmd_add().
42
39
    """
 
40
    import os
 
41
    import sys
43
42
    from bzrlib.osutils import quotefn, kind_marker
44
43
    from bzrlib.errors import BadFileKindError, ForbiddenFileError
 
44
    import bzrlib.branch
 
45
    import bzrlib.osutils
45
46
 
46
 
    assert file_list
47
 
    
48
47
    if sys.platform == 'win32':
49
48
        file_list = glob_expand_for_win32(file_list)
 
49
        
 
50
    if not file_list:
 
51
        file_list = ['.']
50
52
    
51
53
    user_list = file_list[:]
52
54
    assert not isinstance(file_list, basestring)
102
104
        if verbose:
103
105
            note('added %d' % count)
104
106
        b._write_inventory(inv)
 
107
    else:
 
108
        print "nothing new to add"
 
109
        # should this return 1 to the shell?