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

  • Committer: Tim Marston
  • Date: 2014-04-06 14:09:14 UTC
  • Revision ID: tim@ed.am-20140406140914-lyd6n7proccrcr7v
minor tweaks to variable names and comments

Show diffs side-by-side

added added

removed removed

71
71
                                        raise the.program.FatalError(
72
72
                                                'invalid repository name: ' + optarg )
73
73
                                the.repo = optarg
 
74
                        elif opt in [ '--verbose', '-v' ]:
 
75
                                the.verbose += 1
74
76
                        elif opt == "--help":
75
77
                                self.print_help()
76
 
 
 
78
                
77
79
                # discard first argument (the command)
78
80
                args.pop( 0 )
79
81
 
95
97
                if the.repo.vcs.has_changes():
96
98
                        raise the.program.FatalError(
97
99
                                'repo has local changes: %s\n'
98
 
                                'Hint: see "%s stage-revert --help"' %
 
100
                                'Hint: see "%s stage-revert --help"' % 
99
101
                                ( the.repo.name, the.program.name ) )
100
102
 
101
103
                # copy-in changes to repo
107
109
                                ( the.home_dir, the.repo.dir, '\n  '.join( e.conflicts ) ) )
108
110
 
109
111
                # perform vcs update
110
 
                if the.verbose >= 1: print "updating %s" % the.repo.dir
 
112
                if the.verbose: print "updating %s" % the.repo.dir
111
113
                updated_files = the.repo.vcs.update()
112
114
 
113
115
                message = ''
132
134
                deployment.copy_out()
133
135
 
134
136
                # now we've copied-out, revert any copied-in changes!
135
 
                if the.verbose >= 1: print "reverting %s" % the.repo.dir
 
137
                if the.verbose: print "reverting %s" % the.repo.dir
136
138
                the.repo.vcs.revert()