/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/frontend/gtk/mkdir.py

  • Committer: Jelmer Vernooij
  • Date: 2006-09-05 01:08:34 UTC
  • mto: (0.8.83 merge)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060905010834-93a42bcfcbe57d6c
Remove mkdir, add, rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        if checkbox.get_active():
74
74
            # Want to create a versioned directory
75
75
            try:
76
 
                fileops.mkdir(newdir)
77
 
            except errors.DirectoryAlreadyExists:
78
 
                self.dialog.error_dialog(_('Directory already exists'),
79
 
                                         _('Please specify another name to continue.'))
80
 
                return
 
76
                from bzrlib.workingtree import WorkingTree
 
77
    
 
78
                os.mkdir(newdir)
 
79
 
 
80
                wt, dd = WorkingTree.open_containing(newdir)
 
81
                wt.add([dd])
 
82
            except OSError, e:
 
83
                if e.errno == 17:
 
84
                    self.dialog.error_dialog(_('Directory already exists'),
 
85
                                             _('Please specify another name to continue.'))
 
86
                else:
 
87
                    raise
81
88
            except errors.NotBranchError:
82
89
                self.dialog.warning_dialog(_('Directory is not in a branch'),
83
90
                                           _('You can only create a non-versioned directory.'))