/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/vcs/bzr.py

  • Committer: Tim Marston
  • Date: 2014-04-12 12:53:54 UTC
  • Revision ID: tim@ed.am-20140412125354-64aysxvaz7nnk8hm
make verbose levels clearer

Show diffs side-by-side

added added

removed removed

113
113
                                        raise RunTimeError(
114
114
                                                'failed to parse bzr kind change: %s' % file )
115
115
                                file = matches.group( 1 )
116
 
                                if the.verbose > 1: print "removing (kind changed): " + file
 
116
                                if the.verbose >= 2: print "removing (kind changed): " + file
117
117
                                full_file = os.path.join( self.dir, file )
118
118
                                if os.path.isfile( full_file ) or os.path.islink( full_file ):
119
119
                                        os.unlink( full_file )
132
132
                # remove unknown files
133
133
                if 'unknown' in files:
134
134
                        for file in files[ 'unknown' ]:
135
 
                                if the.verbose > 1: print "removing (unknown): " + file
 
135
                                if the.verbose >= 2: print "removing (unknown): " + file
136
136
                                full_file = os.path.join( self.dir, file )
137
137
                                if os.path.isfile( full_file ):
138
138
                                        os.unlink( full_file )
202
202
                for line in buf:
203
203
                        if not re.search( '^[-R+ ?][K NMD!][* ] ', line ): continue
204
204
                        line = line.rstrip()
205
 
                        if the.verbose > 1: print '  %s' % line
 
205
                        if the.verbose >= 2: print '  %s' % line
206
206
 
207
207
                        # renames show before and after file names
208
208
                        matches = re.search( '^R.. (.*?)[/@+]? => (.*?)[/@+]?$', line )
254
254
 
255
255
 
256
256
        def run( self, cmd ):
257
 
                if the.verbose > 1: print 'exec: %s' % ' '.join( cmd )
 
257
                if the.verbose >= 2: print 'exec: %s' % ' '.join( cmd )
258
258
                p = Popen( cmd, cwd = self.dir,
259
259
                                   stdout = subprocess.PIPE, stderr = subprocess.STDOUT )
260
260
                output = p.communicate()[ 0 ]