/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/command/status.py

  • Committer: Tim Marston
  • Date: 2014-04-18 14:47:58 UTC
  • Revision ID: tim@ed.am-20140418144758-78lktgncp0j5wxfu
added add command

Show diffs side-by-side

added added

removed removed

30
30
 
31
31
 
32
32
        def print_help( self ):
33
 
                print "Usage: " + the.program.name + " status [--repo=REPO] [FILE]..."
 
33
                print "Usage: " + the.program.name + " status [--repo=REPO]"
34
34
                print
35
35
                #      01234567890123456789012345678901234567890123456789012345678901234567890123456789
36
36
                print "Show the state of files in the local repository (including modifications and"
70
70
                args.pop( 0 )
71
71
 
72
72
                # remaining arguments
73
 
                self.files = args
 
73
                if len( args ):
 
74
                        raise the.program.UsageError( 'too many arguments' )
74
75
 
75
76
 
76
77
        def run( self ):
78
79
                # set up repo and check it exists
79
80
                the.repo.check_dir_exists()
80
81
 
81
 
                # determine files
82
 
                files = self.expand_files( self.files )
83
 
 
84
82
                message = ''
85
83
 
86
84
                # initialise deployment and check if it's ongoing
103
101
                else:
104
102
 
105
103
                        # check status
106
 
                        walker = StatusWalker( files if files else None )
 
104
                        walker = StatusWalker()
107
105
                        walker.walk()
108
106
                        if walker.modified:
109
107
                                message += 'modified:\n  %s\n' % \