Panda3D
Public Member Functions | Public Attributes

PatchMaker.PackageVersion Class Reference

List of all members.

Public Member Functions

def __init__
def applyPatch
def cleanup
def getFile
def getNext
def getPatchChain
def getRecreateFilePlan

Public Attributes

 file
 fromPatches
 hostUrl
 packageBase
 packageCurrent
 packageName
 packageTop
 platform
 printName
 tempFile
 toPatches
 version

Detailed Description

A specific patch version of a package.  This is not just
the package's "version" string; it also corresponds to the
particular patch version, which increments independently of
the "version". 

Constructor & Destructor Documentation

def __init__ (   self,
  packageName,
  platform,
  version,
  hostUrl,
  file 
)

Member Function Documentation

def applyPatch (   self,
  origFile,
  patchFilename 
)
Applies the named patch to the indicated original
file, storing the results in a temporary file, and returns
that temporary Filename.  Returns None on failure. 
def cleanup (   self)
def getFile (   self)
Returns the Filename of the archive file associated
with this version.  If the file doesn't actually exist on
disk, a temporary file will be created.  Returns None if
the file can't be recreated. 
def getNext (   self,
  package 
)
Gets the next patch in the chain towards this
package. 
def getPatchChain (   self,
  startPv,
  alreadyVisited = [] 
)
Returns a list of patches that, when applied in
sequence to the indicated PackageVersion object, will
produce this PackageVersion object.  Returns None if no
chain can be found. 
def getRecreateFilePlan (   self,
  alreadyVisited = [] 
)
Returns the tuple (startFile, startPv, plan),
describing how to recreate the archive file for this
version.  startFile and startPv is the Filename and
packageVersion of the file to start with, and plan is a
list of tuples (patchfile, pv), listing the patches to
apply in sequence, and the packageVersion object
associated with each patch.  Returns (None, None, None) if
there is no way to recreate this archive file.  

Member Data Documentation

 All Classes Namespaces Functions Variables Properties