path.svnwc API [rev. unknown]

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

def open(self, mode='r'):

return an opened file with the given mode.

def parts(self, reverse=False):

return a root-first list of all ancestor directories plus the path itself.

def propdel(self, name):

delete property name on this path.

def propget(self, name):

get property name on this path.

def proplist(self, rec=0):

return a mapping of property names to property values. If rec is True, then return a dictionary mapping sub-paths to such mappings.

def propset(self, name, value, *args):

set property name to value on this path.

def read(self, mode='rb'):

read and return a bytestring from reading the path.

def readlines(self, cr=1):

read and return a list of lines from the path. if cr is False, the newline will be removed from the end of each line.

def relto(self, relpath):

return a string which is the relative part of the path to the given 'relpath'.

def remove(self, rec=1, force=1):

remove a file or a directory tree. 'rec'ursive is ignored and considered always true (because of underlying svn semantics.

def rename(self, target):

rename this path to target.

def revert(self, rec=0):

revert the local changes of this path. if rec is True, do so recursively.

def size(self):

Return the size of the file content of the Path.

def status(self, updates=0, rec=0, externals=0):

return (collective) Status object for this file.

def svnurl(self):

return current SvnPath for this WC-item.

def switch(self, url):

switch to given URL.

def unlock(self):

unset a previously set lock

def update(self, rev='HEAD'):

update working copy item to given revision. (None -> HEAD).

def visit(self, fil=None, rec=None, ignore=<class py.__.path.common._dummyclass at 0x2000000000518ad0>):

yields all paths below the current one fil is a filter (glob pattern or callable), if not matching the path will not be yielded, defaulting to None (everything is returned) rec is a filter (glob pattern or callable) that controls whether a node is descended, defaulting to None ignore is an Exception class that is ignoredwhen calling dirlist() on any of the paths (by default, all exceptions are reported)

def write(self, content, mode='wb'):

def __add__(self, other):

return new path object with 'other' added to the basename

def __cmp__(self, other):

return sort value (-1, 0, +1).

def __contains__(self, other):

*no docstring available*

def __div__(self, other):

*no docstring available*

def __eq__(self, other):

*no docstring available*

def __hash__(self):

*no docstring available*

def __iter__(self):

*no docstring available*

def __repr__(self):

*no docstring available*

def __str__(self):