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

  • Committer: Tim Marston
  • Date: 2016-02-28 17:51:29 UTC
  • Revision ID: tim@ed.am-20160228175129-ea341cedv8g3s63m
fixed display of bzr output

Show diffs side-by-side

added added

removed removed

53
53
                        [ "repo=", "verbose", "help" ] )
54
54
                for opt, optarg in opts:
55
55
                        if opt in [ '--repo', '-r' ]:
56
 
                                if not re.match( '^[-a-zA-z0-9.]+$', optarg ):
 
56
                                if not re.search( '^[-a-zA-z0-9.]+$', optarg ):
57
57
                                        raise the.program.FatalError(
58
58
                                                'invalid repository name: ' + optarg )
59
59
                                the.repo = optarg
61
61
                                the.verbose += 1
62
62
                        elif opt == "--help":
63
63
                                self.print_help()
64
 
                
 
64
 
65
65
                # discard first argument (the command)
66
66
                args.pop( 0 )
67
67
 
89
89
                if the.repo.vcs.has_changes():
90
90
                        raise the.program.FatalError(
91
91
                                'repo has local changes: %s\n'
92
 
                                'Hint: see "%s stage-revert --help"' % 
 
92
                                'Hint: see "%s stage-revert --help"' %
93
93
                                ( the.repo.name, the.program.name ) )
94
94
 
95
95
                # check status