Package svndump :: Module file :: Class SvnDumpFileWithHistory
[show private | hide private]
[frames | no frames]

Class SvnDumpFileWithHistory

SvnDumpFile --+
              |
             SvnDumpFileWithHistory


Method Summary
  __init__(self)
  add_node(self, node)
Add a node to the current revision.
  add_rev(self, revProps)
Add a new revision to this dump file.
  close(self)
Close this svn dump file.
  create_with_rev_0(self, filename, uuid, rev0date)
Create a new dump file starting with revision 0.
  create_with_rev_n(self, filename, uuid, firstRevNr)
Create a new dump file.
list of lists (of lists) get_rev_errors(self, revnr)
Returns a list of the dump errors for the given revision.
string nodehist_get_kind(self, revnr, path)
Returns the kind of a node if it exists, else None.
  open(self, filename)
Open a dump file for reading and read the header.
bool read_next_rev(self)
Read the next revision.
  set_check_actions(self, docheck)
Set the check actions flag to the given value.
  set_check_dates(self, docheck)
Set the check dates flag to the given value.
  set_check_md5(self, docheck)
Set the check md5 sums flag to the given value.
  set_enable_node_history(self, enable)
Set the check md5 sums flag to the given value.
    Inherited from SvnDumpFile
  add_rev_from_dump(self, dump)
Add the current revision of the specified SvnDumpFile to this one.
bool create_like(self, filename, srcfile)
Creates this dump file like srcfile.
SvnDumpNode get_node(self, index)
Returns the node at the given index.
integer get_node_count(self)
Returns the count of nodes of the current revision.
  get_nodes_by_path(self, path, actions)
Returns a list of nodes matching path and actions.
  get_nodes_iter(self)
Returns an iterator returning the nodes.
string get_rev_author(self)
Returns the author of the current revision.
list( integer ) get_rev_date(self)
Returns the date of the current revision as ( time_t, micros ).
string get_rev_date_str(self)
Returns the date of the current revision as string.
string get_rev_log(self)
Returns the log message of the current revision.
integer get_rev_nr(self)
Returns the current revision number.
list( string ) get_rev_prop_names(self)
Returns a list of revision property names of the current revision.
string get_rev_prop_value(self, name)
Returns the value of the revision property with the specified name.
dict( string -> string ) get_rev_props(self)
Returns a dict containing the revision properties.
string get_uuid(self)
Returns the UUID of this dump file.
bool has_rev_prop(self, name)
Returns true if the revision has a property with the specified name.
bool has_revision(self)
Returns false when EOF occured.
  set_rev_author(self, author)
Set the author of this revision.
string set_rev_date(self, dateStr)
Check a date string, set and return a valid one.
  set_rev_log(self, logMsg)
Set the log message of this revision.
  set_rev_prop_value(self, name, value)
Set the value of the revision property with the specified name to the given value.
  set_uuid(self, uuid)
Returns the UUID of this dump file.

Method Details

add_node(self, node)

Add a node to the current revision.

This method uses SvnDumpNode.write_text_to_file().
Parameters:
node - The node to add.
           (type=SvnDumpNode)
Overrides:
svndump.file.SvnDumpFile.add_node

add_rev(self, revProps)

Add a new revision to this dump file.
Parameters:
revProps - A dict with revision properties.
           (type=dict( string -> string ))
Overrides:
svndump.file.SvnDumpFile.add_rev

close(self)

Close this svn dump file.
Overrides:
svndump.file.SvnDumpFile.close

create_with_rev_0(self, filename, uuid, rev0date)

Create a new dump file starting with revision 0.
Parameters:
filename - Name of the new dump file.
           (type=string)
uuid - UUID of the new dump file or None.
           (type=string)
rev0date - Svn date string for revision 0.
           (type=string)
Overrides:
svndump.file.SvnDumpFile.create_with_rev_0

create_with_rev_n(self, filename, uuid, firstRevNr)

Create a new dump file.
Parameters:
filename - Name of the new dump file.
           (type=string)
uuid - UUID of the new dump file or None.
           (type=string)
firstRevNr - First revision number (>0).
           (type=integer)
Overrides:
svndump.file.SvnDumpFile.create_with_rev_n

get_rev_errors(self, revnr=None)

Returns a list of the dump errors for the given revision. (Obviously) It will only report errors enabled by set_check_xxxx.
Parameters:
revnr - (Optional) Number of desired revision
           (type=int)
Returns:
Each element in the list is a list representing one error, with the following members:
  • The error type (SvnDumpFile.ERR_XXXX)
  • A list of error information:
    • for ERR_REV_DATE_OLDER: [ revdatestr, prevdatestr ]
    • for ERR_NODE_MD5_FAIL: [ path, md5calc, md5node ]
    • for ERR_NODE_XXXX: [ path, action, ... ]
      • for ERR_NODE_NO_PARENT: [ path, action, parentpath ]
      • for ERR_NODE_PARENT_NOT_DIR: [ path, action, parentpath ]
      • for ERR_NODE_NO_COPY_SRC: [ path, action, cfrev, cfpath ]
Errors in this list are guaranteed to be in order of revision errors, then node errors in the same order as when iterated via get_nodes_iter().
           (type=list of lists (of lists))

nodehist_get_kind(self, revnr, path)

Returns the kind of a node if it exists, else None.
Parameters:
revnr - Current revision number.
           (type=int)
path - Path of a node.
           (type=string)
Returns:
"D" for dirs, "F" for files or None.
           (type=string)

open(self, filename)

Open a dump file for reading and read the header.
Parameters:
filename - Name of an existing dump file.
           (type=string)
Overrides:
svndump.file.SvnDumpFile.open

read_next_rev(self)

Read the next revision.
Returns:
False if EOF occured.
           (type=bool)
Overrides:
svndump.file.SvnDumpFile.read_next_rev

set_check_actions(self, docheck)

Set the check actions flag to the given value.
Parameters:
docheck - New value for the flag.
           (type=bool)

set_check_dates(self, docheck)

Set the check dates flag to the given value.
Parameters:
docheck - New value for the flag.
           (type=bool)

set_check_md5(self, docheck)

Set the check md5 sums flag to the given value.
Parameters:
docheck - New value for the flag.
           (type=bool)

set_enable_node_history(self, enable)

Set the check md5 sums flag to the given value.

Generated by Epydoc 2.1 on Fri Aug 14 23:53:11 2009 http://epydoc.sf.net