/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/remove.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-25 01:58:44 UTC
  • mto: (0.14.1 main)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060925015844-12e9eec2d5f41420
Huge cleanup after removing backend codebase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    sys.exit(1)
29
29
 
30
30
import bzrlib.errors as errors
 
31
from bzrlib.workingtree import WorkingTree
31
32
 
32
33
class OliveRemove:
33
34
    """ Display the Remove file(s) dialog and perform the needed actions. """
90
91
            # Remove added files recursively
91
92
            try:
92
93
                wt, path = WorkingTree.open_containing(directory)
93
 
                wt.remove(path)
94
94
            except errors.NotBranchError:
95
95
                self.dialog.error_dialog(_('Directory is not a branch'),
96
96
                                         _('You can perform this action only in a branch.'))
97
97
                self.comm.set_busy(self.window, False)
98
98
                return
99
 
            except errors.NoMatchingFiles:
 
99
            except:
 
100
                raise
 
101
            
 
102
            added = wt.changes_from(wt.basis_tree()).added
 
103
            file_list = sorted([f[0] for f in added], reverse=True)
 
104
            if len(file_list) == 0:
100
105
                dialog.warning_dialog(_('No matching files'),
101
106
                                      _('No added files were found in the working tree.'))
102
107
                self.comm.set_busy(self.window, False)
103
 
            except:
104
 
                raise
 
108
                return
 
109
            wt.remove(file_list)
105
110
        else:
106
111
            # This should really never happen.
107
112
            pass