class documentation

class PkgGitRepository(GitRepository):

Known subclasses: gbp.deb.git.DebianGitRepository, gbp.rpm.git.RpmGitRepository

View In Hierarchy

A git repository that holds the source of a Distro package

Static Method sanitize_prefix Make sure git-archive prefix ends with a slash
Method __init__ Undocumented
Method archive_comp Create a compressed source tree archive with the given options
Instance Variable pristine_tar Undocumented
Method _archive_comp_single Create a compressed source tree archive without submodules
Method _archive_comp_submodules Create a compressed source tree archive with submodules.
@staticmethod
def sanitize_prefix(prefix):

Make sure git-archive prefix ends with a slash

>>> PkgGitRepository.sanitize_prefix('')
'/'
>>> PkgGitRepository.sanitize_prefix('foo/')
'foo/'
>>> PkgGitRepository.sanitize_prefix('/foo/bar')
'foo/bar/'
def __init__(self, *args, **kwargs):
def archive_comp(self, treeish, output, prefix, comp, format='tar', submodules=False):

Create a compressed source tree archive with the given options

def _archive_comp_single(self, treeish, output, prefix, comp, format='tar'):

Create a compressed source tree archive without submodules

We have this as a special case since it avoids a temporary file

def _archive_comp_submodules(self, treeish, output, prefix, comp, format='tar'):

Create a compressed source tree archive with submodules.

Concatenates the archives generated by git-archive into one and compresses the end result.

Exception handling is left to the caller.