/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-18 14:42:00 UTC
  • Revision ID: tim@ed.am-20140418144200-ksbr3l58p2v3jhy2
fixed bugs in command.expand_files, where results could be not unique, nor
sorted, and make sure the last component of the files is not resolved if it is a
symlink

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
102
 
                deployment.copy_in()
 
104
                try:
 
105
                        deployment.copy_in()
 
106
                except deployment.CopyInConflicts as e:
 
107
                        raise the.program.FatalError(
 
108
                                'Files in %s differ too severly from %s:\n  %s\n' % \
 
109
                                ( the.home_dir, the.repo.dir, '\n  '.join( e.conflicts ) ) )
103
110
 
104
111
                # perform vcs update
105
112
                if the.verbose >= 1: print "updating %s" % the.repo.dir