Panda3D
Public Member Functions | Public Attributes | List of all members
PatchMaker.PackageVersion Class Reference

Public Member Functions

def __init__ (self, packageName, platform, version, hostUrl, file)
 
def applyPatch (self, origFile, patchFilename)
 
def cleanup (self)
 
def getFile (self)
 
def getNext (self, package)
 
def getPatchChain (self, startPv, alreadyVisited=[])
 
def getRecreateFilePlan (self, alreadyVisited=[])
 

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

◆ __init__()

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

Member Function Documentation

◆ applyPatch()

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. 

◆ cleanup()

def cleanup (   self)

◆ getFile()

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. 

◆ getNext()

def getNext (   self,
  package 
)
Gets the next patch in the chain towards this
package. 

◆ getPatchChain()

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. 

◆ getRecreateFilePlan()

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

◆ file

file

◆ fromPatches

fromPatches

◆ hostUrl

hostUrl

◆ packageBase

packageBase

◆ packageCurrent

packageCurrent

◆ packageName

packageName

◆ packageTop

packageTop

◆ platform

platform

◆ printName

printName

◆ tempFile

tempFile

◆ toPatches

toPatches

◆ version

version