/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-18 14:47:58 UTC
  • Revision ID: tim@ed.am-20140418144758-78lktgncp0j5wxfu
added add command

Show diffs side-by-side

added added

removed removed

253
253
                return files['conflicts'] if 'conflicts' in files else None
254
254
 
255
255
 
 
256
        def add( self, files ):
 
257
                """Make sure files are added to version control.
 
258
                @param files a list of relative filenames
 
259
                """
 
260
 
 
261
                # bzr add
 
262
                self.run( [ 'bzr', 'add' ] + files )
 
263
 
 
264
 
 
265
        def commit( self ):
 
266
                """Commit changes to the repo.
 
267
                """
 
268
 
 
269
                # bzr commit
 
270
                self.run( [ 'bzr', 'commit', '-m', '' ] )
 
271
 
 
272
 
256
273
        def run( self, cmd ):
257
274
                if the.verbose >= 2: print 'exec: %s' % ' '.join( cmd )
258
275
                p = Popen( cmd, cwd = self.dir,