path.svnurl API [rev. 38799]

class SvnCommandPath(SvnPathBase):

path implementation that offers access to (possibly remote) subversion repositories.

class attributes and properties:

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

methods:

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 common(self, other):

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

def copy(self, target, msg='copied by py lib invocation'):

copy path to target with checkin message msg.

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

return the directory path of the current path joined with any given path arguments.

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

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

def info(self):

return an Info structure with svn-provided information.

def join(self, *args):

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):

list directory contents, possibly filter by the given fil func and possibly sorted.

def load(self):

return object unpickled from self.read()

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, **kwargs):

create & return the directory joined with args. You can provide a checkin message by giving a keyword argument 'msg'

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 propget(self, name):

return the content of the given property.

def proplist(self):

list all property names.

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, msg='removed by py lib invocation'):

remove a file or directory (or a directory tree if rec=1) with checkin message msg.

def rename(self, target, msg='renamed by py lib invocation'):

rename this path to target with checkin message msg.

def size(self):

Return the size of the file content of the Path.

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

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 __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):

def __hash__(self):

*no docstring available*

def __iter__(self):

*no docstring available*

def __ne__(self, other):

*no docstring available*

def __repr__(self):

*no docstring available*

def __str__(self):

return a string representation (including rev-number)