Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PatchMaker.PackageVersion Class Reference

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

## Public Attributes
| file = file
list | fromPatches = []
| hostUrl = hostUrl
| packageBase = None
| packageCurrent = None
| packageName = packageName
| packageTop = None
| platform = platform
| printName = None
| tempFile = None
list | toPatches = []
| version = 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__()

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

## Member Function Documentation

## ◆ applyPatch()

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

cleanup | ( |  | self | ) |

## ◆ getFile()

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

getNext | ( |  | self,
|  |  | package )

     Gets the next patch in the chain towards this
    package.

## ◆ getPatchChain()

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

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 = file

## ◆ fromPatches

list fromPatches = []

## ◆ hostUrl

hostUrl = hostUrl

## ◆ packageBase

packageBase = None

## ◆ packageCurrent

packageCurrent = None

## ◆ packageName

packageName = packageName

## ◆ packageTop

packageTop = None

## ◆ platform

platform = platform

## ◆ printName

printName = None

## ◆ tempFile

tempFile = None

## ◆ toPatches

list toPatches = []

## ◆ version

version = version