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

  • Committer: Tim Marston
  • Date: 2016-02-13 14:21:53 UTC
  • Revision ID: tim@ed.am-20160213142153-68g7pzq0au6bejep
fixed init command

Show diffs side-by-side

added added

removed removed

57
57
                                        raise the.program.FatalError(
58
58
                                                'invalid repository name: ' + optarg )
59
59
                                the.repo = optarg
60
 
                        elif opt in [ '--verbose', '-v' ]:
61
 
                                the.verbose += 1
62
60
                        elif opt == "--help":
63
61
                                self.print_help()
64
 
                
 
62
 
65
63
                # discard first argument (the command)
66
64
                args.pop( 0 )
67
65
 
108
106
 
109
107
                                raise e
110
108
 
 
109
                        message = ''
 
110
 
 
111
                        # check for deployment conclicts
 
112
                        conflicts = deployment.get_conflicts()
 
113
                        if conflicts:
 
114
                                message += 'deployment conflicts:\n  %s' % \
 
115
                                                   '\n  '.join( conflicts )
 
116
 
 
117
                        # stop if there are conflicts
 
118
                        if message:
 
119
                                raise the.program.FatalError(
 
120
                                        'there were conflicts...\n' + message )
 
121
 
111
122
                        # perform deployment
112
 
                        try:
113
 
                                deployment.copy_out()
114
 
                        except deployment.Conflict as e:
115
 
                                raise the.program.FatalError( e.msg )
 
123
                        deployment.copy_out()
116
124
 
117
125
                else:
118
126