/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-05 19:21:27 UTC
  • Revision ID: tim@ed.am-20140405192127-yvt08c7qnnp2nr8i
fixed some bugs in Bzr.revert()

Show diffs side-by-side

added added

removed removed

99
99
                revision.
100
100
                """
101
101
 
102
 
                # bzr revert
 
102
                # bzr revert (run twice to handle a bug in bzr where reverting a
 
103
                # directory from a symlink can cause conflicts during initial revert)
 
104
                self.run( [ 'bzr', 'revert', '--no-backup' ] )
103
105
                self.run( [ 'bzr', 'revert', '--no-backup' ] )
104
106
 
105
107
                # bzr st
109
111
                # remove unknown files
110
112
                if 'unknown' in files:
111
113
                        for file in files[ 'unknown' ]:
 
114
                                if the.verbose > 1: print "removing unknown: " + file
112
115
                                full_file = os.path.join( self.dir, file )
113
116
                                if os.path.isfile( full_file ):
114
117
                                        os.unlink( full_file )
115
 
                                elif os.full_file.isdir( full_file ):
 
118
                                elif os.path.isdir( full_file ):
116
119
                                        shutil.rmtree( full_file )
117
120
                                else:
118
121
                                        raise RuntimeError( 'exotic file in repo: %s' % file )