~phanatic/olive/main

« back to all changes in this revision

Viewing changes to olive/handler.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-28 14:40:06 UTC
  • Revision ID: Szilveszter.Farkas@gmail.com-20060928144006-5b3001d2a587fc5a
Fix init error. Added .bzrignore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
    
168
168
    def on_menuitem_branch_initialize_activate(self, widget):
169
169
        """ Initialize current directory. """
 
170
        import bzrlib.bzrdir as bzrdir
 
171
        
170
172
        try:
171
173
            location = self.comm.get_path()
172
174
            from bzrlib.builtins import get_format_type
178
180
     
179
181
            try:
180
182
                existing_bzrdir = bzrdir.BzrDir.open(location)
181
 
            except NotBranchError:
 
183
            except errors.NotBranchError:
182
184
                bzrdir.BzrDir.create_branch_convenience(location, format=format)
183
185
            else:
184
186
                if existing_bzrdir.has_branch():
185
187
                    if existing_bzrdir.has_workingtree():
186
 
                        raise AlreadyBranchError(location)
 
188
                        raise errors.AlreadyBranchError(location)
187
189
                    else:
188
 
                        raise BranchExistsWithoutWorkingTree(location)
 
190
                        raise errors.BranchExistsWithoutWorkingTree(location)
189
191
                else:
190
192
                    existing_bzrdir.create_branch()
191
193
                    existing_bzrdir.create_workingtree()