diff options
Diffstat (limited to 'gbp/deb/git.py')
-rw-r--r-- | gbp/deb/git.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gbp/deb/git.py b/gbp/deb/git.py index aa19f82a..3f998051 100644 --- a/gbp/deb/git.py +++ b/gbp/deb/git.py @@ -18,10 +18,15 @@ import re from gbp.git import GitRepository, GitRepositoryError +from gbp.deb.pristinetar import PristineTar class DebianGitRepository(GitRepository): """A git repository that holds the source of a Debian package""" + def __init__(self, path): + super(DebianGitRepository, self).__init__(path) + self.pristine_tar = PristineTar(self) + def find_version(self, format, version): """ Check if a certain version is stored in this repo and return the SHA1 @@ -112,4 +117,22 @@ class DebianGitRepository(GitRepository): return version return None + @property + def pristine_tar_branch(self): + """ + The name of the pristine-tar branch, whether it already exists or + not. + """ + return PristineTar.branch + + def has_pristine_tar_branch(self): + """ + Wheter the repo has a I{pristine-tar} branch. + + @return: C{True} if the repo has pristine-tar commits already, C{False} + otherwise + @rtype: C{Bool} + """ + return True if self.has_branch(self.pristine_tar_branch) else False + # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: |