28
29
import bzrlib.errors as errors
30
31
from olive import gladefile
31
from dialog import error_dialog, warning_dialog
34
34
""" Display the Make directory dialog and perform the needed actions. """
63
60
error_dialog(_('No directory name given'),
64
_('Please specify a desired name for the new directory.'))
61
_('Please specify a desired name for the new directory.'))
67
64
if checkbox.get_active():
68
65
# Want to create a versioned directory
70
os.mkdir(os.path.join(self.wt.basedir, self.wtpath, dirname))
67
from bzrlib.workingtree import WorkingTree
69
os.mkdir(os.path.join(wt.base, wtpath))
72
self.wt.add([os.path.join(self.wtpath, dirname)])
75
74
error_dialog(_('Directory already exists'),
76
_('Please specify another name to continue.'))
75
_('Please specify another name to continue.'))
79
78
except errors.NotBranchError:
80
79
warning_dialog(_('Directory is not in a branch'),
81
_('You can only create a non-versioned directory.'))
80
_('You can only create a non-versioned directory.'))
83
82
# Just a simple directory
85
os.mkdir(os.path.join(self.wt.basedir, self.wtpath, dirname))
84
os.mkdir(os.path.join(wt.base, wtpath))
88
87
error_dialog(_('Directory already exists'),
89
_('Please specify another name to continue.'))
88
_('Please specify another name to continue.'))
92
self.comm.refresh_right()
94
94
def close(self, widget=None):
95
95
self.window.destroy()