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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-07-08 17:36:59 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-20060708173659-8ab442681dadd8ea
2006-07-08  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * backend/errors.py: added some exceptions related to diff() and log()
    * backend/info.py: implemented log()
    * backend/info.py: diff() works well with revnos
    * added e-mail address to copyright header

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic)
 
1
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic) <szilveszter.farkas@gmail.com>
2
2
# Some parts of the code are:
3
3
# Copyright (C) 2005, 2006 by Canonical Ltd
4
4
 
22
22
 
23
23
from errors import (DirectoryAlreadyExists, MissingArgumentError,
24
24
                    MultipleMoveError, NoFilesSpecified, NoMatchingFiles,
25
 
                    NotVersionedError)
 
25
                    NonExistingSource, NotVersionedError)
26
26
 
27
27
def add(file_list):
28
28
    """ Add listed files to the branch. 
104
104
    except errors.NotVersionedError:
105
105
        raise NotVersionedError
106
106
 
 
107
def rename(source, target):
 
108
    """ Rename a versioned file
 
109
    
 
110
    :param source: full path to the original file
 
111
    
 
112
    :param target: full path to the new file
 
113
    """
 
114
    if os.access(source, os.F_OK) is not True:
 
115
        raise NonExistingSource(source)
 
116
    
 
117
    move([source, target])