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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-27 19:11:59 UTC
  • mfrom: (0.8.90 merge)
  • mto: (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 103.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060927191159-cc4e54f613575779
Merge all changes. Release 0.11.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
except:
29
29
    sys.exit(1)
30
30
 
31
 
import olive.backend.errors as errors
32
 
import olive.backend.fileops as fileops
 
31
import bzrlib.errors as errors
33
32
 
34
33
class OliveMkdir:
35
34
    """ Display the Make directory dialog and perform the needed actions. """
73
72
        if checkbox.get_active():
74
73
            # Want to create a versioned directory
75
74
            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
 
75
                from bzrlib.workingtree import WorkingTree
 
76
    
 
77
                os.mkdir(newdir)
 
78
 
 
79
                wt, dd = WorkingTree.open_containing(newdir)
 
80
                wt.add([dd])
 
81
            except OSError, e:
 
82
                if e.errno == 17:
 
83
                    self.dialog.error_dialog(_('Directory already exists'),
 
84
                                             _('Please specify another name to continue.'))
 
85
                else:
 
86
                    raise
81
87
            except errors.NotBranchError:
82
88
                self.dialog.warning_dialog(_('Directory is not in a branch'),
83
89
                                           _('You can only create a non-versioned directory.'))