/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/backend/fileops.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-09 13:15:41 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060809131541-cd4eba8e228f2b60
Implemented Make directory functionality; some cleanups.

2006-08-09  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/backend/fileops.py: added NotBranchError support to mkdir()
    * olive/frontend/gtk/mkdir.py: implemented OliveMkdir
    * olive/frontend/gtk/handler.py: added Make directory signal handler

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from errors import (DirectoryAlreadyExists, MissingArgumentError,
24
24
                    MultipleMoveError, NoFilesSpecified, NoMatchingFiles,
25
 
                    NonExistingSource, NotBranchError, NotSameBranchError,
26
 
                    NotVersionedError, PermissionDenied)
 
25
                    NonExistingSource, NotBranchError, NotVersionedError)
27
26
 
28
27
def add(file_list, recursive=False):
29
28
    """ Add listed files to the branch. 
78
77
    
79
78
    if len(names_list) < 2:
80
79
        raise MissingArgumentError
81
 
    
82
 
    try:
83
 
        tree, rel_names = tree_files(names_list)
84
 
    except errors.NotBranchError:
85
 
        raise NotBranchError
86
 
    except errors.BzrCommandError:
87
 
        # not the same branch presumably
88
 
        raise NotSameBranchError
 
80
    tree, rel_names = tree_files(names_list)
89
81
        
90
82
    if os.path.isdir(names_list[-1]):
91
83
        # move into existing directory
160
152
        tree1 = WorkingTree.open_containing(filename)[0]
161
153
    except errors.NotBranchError:
162
154
        return 'unknown'
163
 
    except errors.PermissionDenied:
164
 
        raise PermissionDenied(filename)
165
155
    
166
156
    branch = tree1.branch
167
157
    tree2 = tree1.branch.repository.revision_tree(branch.last_revision())