/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-07-17 18:19:47 UTC
  • Revision ID: tim@ed.am-20140717181947-pe060idibfu0kfsk
fixed diff command out-of-order output issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
 
32
32
        def print_help( self ):
33
 
                print "Usage: " + the.program.name + " status [--repo=REPO]"
 
33
                print "Usage: " + the.program.name + " status [--repo=REPO] [FILE]..."
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
 
                if len( args ):
74
 
                        raise the.program.UsageError( 'too many arguments' )
 
73
                self.files = args
75
74
 
76
75
 
77
76
        def run( self ):
79
78
                # set up repo and check it exists
80
79
                the.repo.check_dir_exists()
81
80
 
 
81
                # determine files
 
82
                files = self.expand_files( self.files )
 
83
 
82
84
                message = ''
83
85
 
84
86
                # initialise deployment and check if it's ongoing
85
87
                deployment = Deployment()
86
88
                if deployment.is_ongoing():
 
89
                        print "deployment ongoing"
87
90
 
88
91
                        # check for conflicts in repo
89
92
                        files = the.repo.vcs.get_conflicts()
100
103
                else:
101
104
 
102
105
                        # check status
103
 
                        walker = StatusWalker()
 
106
                        walker = StatusWalker( files if files else None )
104
107
                        walker.walk()
105
108
                        if walker.modified:
106
109
                                message += 'modified:\n  %s\n' % \