path.svnwc API [rev. 57595]

class SvnWCCommandPath(FSPathBase):

path implementation offering access/modification to svn working copies. It has methods similar to the functions in os.path and similar to the commands of the svn client.

class attributes and properties:

basename: <property object (dynamically calculated value)>
ext: <property object (dynamically calculated value)>
purebasename: <property object (dynamically calculated value)>
sep: /
strpath: <property object (dynamically calculated value)>
url: <property object (dynamically calculated value)>

methods:

def add(self):

def blame(self):

return a list of tuples of three elements: (revision, commiter, line)

def check(self, **kw):

check a path for existence, or query its properties without arguments, this returns True if the path exists (on the filesystem), False if not with (keyword only) arguments, the object compares the value of the argument with the value of a property with the same name (if it has one, else it raises a TypeError) when for example the keyword argument 'ext' is '.py', this will return True if self.ext == '.py', False otherwise

def checkout(self, url=None, rev=None):

checkout from url to local wcpath.

def cleanup(self):

remove any locks from the resource

def commit(self, msg='', rec=1):

commit with support for non-recursive commits

def common(self, other):

return the common part shared with the other path or None if there is no common part.

def copy(self, target):

copy path to target.

def diff(self, rev=None):

return a diff of the current path against revision rev (defaulting to the last one).

def dirpath(self, *args):

return the directory Path of the current Path.

def dump(self, obj):

pickle object into path location

def ensure(self, *args, **kwargs):

ensure that an args-joined path exists (by default as a file). if you specify a keyword argument 'directory=True' then the path is forced to be a directory path.

def info(self, usecache=1):

return an Info structure with svn-provided information.

def join(self, *args, **kwargs):

return a new Path (with the same revision) which is composed of the self Path followed by 'args' path components.

def listdir(self, fil=None, sort=None):

return a sequence of Paths. listdir will return either a tuple or a list of paths depending on implementation choices.

def load(self):

return object unpickled from self.read()

def lock(self):

set a lock (exclusive) on the resource

def log(self, rev_start=None, rev_end=1, verbose=False):

return a list of LogEntry instances for this path. rev_start is the starting revision (defaulting to the first one). rev_end is the last revision (defaulting to HEAD). if verbose is True, then the LogEntry instances also know which files changed.

def mkdir(self, *args):

create & return the directory joined with args.

def move(self, target):

move this path to target.

def mtime(self):

Return the last modification time of the file.

def new(self, **kw):

create a modified version of this path. A 'rev' argument indicates a new revision. the following keyword arguments modify various path parts: http://host.com/repo/path/file.ext |-----------------------| dirname |------| basename |--| purebasename |--| ext