Undocumented
Class Variable cmd Undocumented
Method __init__ Undocumented
Method uptodate Undocumented
Method tarball Undocumented
Method scan Invoke uscan to fetch a new upstream version
Instance Variable _uptodate Undocumented
Instance Variable _tarball Undocumented
Instance Variable _dir Undocumented
Method _parse Parse the uscan output return and update the object's properties
Method _parse_uptodate Check if the uscan reports that we're up to date.
Method _raise_error Parse the uscan output for errors and warnings and raise a UscanError exception based on this. If no error detail is found a generic error message is used.
cmd =
Undocumented
(type: str)
def __init__(self, dir="""."""):
Undocumented
_uptodate =
Undocumented
(type: bool)
_tarball =
Undocumented
_dir =
Undocumented
@property
def uptodate(self):
Undocumented
@property
def tarball(self):
Undocumented
def _parse(self, out):

Parse the uscan output return and update the object's properties

Parametersoutuscan output (type: string
>>> u = Uscan('http://example.com/')
>>> u._parse('<target>virt-viewer_0.4.0.orig.tar.gz</target>')
>>> u.tarball
'../virt-viewer_0.4.0.orig.tar.gz'
>>> u.uptodate
False
>>> u._parse('')
Traceback (most recent call last):
...
gbp.deb.uscan.UscanError: Couldn't find 'upstream-url' in uscan output
)
def _parse_uptodate(self, out):

Check if the uscan reports that we're up to date.

Parametersoutuscan output (type: string)
ReturnsTrue if package is uptodate
>>> u = Uscan('http://example.com/')
>>> u._parse_uptodate('<status>up to date</status>')
True
>>> u.tarball
>>> u.uptodate
True
>>> u._parse_uptodate('')
False
>>> u.tarball
>>> u.uptodate
False
def _raise_error(self, out):

Parse the uscan output for errors and warnings and raise a UscanError exception based on this. If no error detail is found a generic error message is used.

Parametersoutuscan output (type: string)
RaisesUscanErrorexception raised
>>> u = Uscan('http://example.com/')
>>> u._raise_error("<warnings>uscan warning: "
... "In watchfile debian/watch, reading webpage\n"
... "http://a.b/ failed: 500 Cant connect "
... "to example.com:80 (Bad hostname)</warnings>")
Traceback (most recent call last):
...
gbp.deb.uscan.UscanError: Uscan failed: uscan warning: In watchfile debian/watch, reading webpage
http://a.b/ failed: 500 Cant connect to example.com:80 (Bad hostname)
>>> u._raise_error("<errors>uscan: Can't use --verbose if "
... "you're using --dehs!</errors>")
Traceback (most recent call last):
...
gbp.deb.uscan.UscanError: Uscan failed: uscan: Can't use --verbose if you're using --dehs!
>>> u = u._raise_error('')
Traceback (most recent call last):
...
gbp.deb.uscan.UscanError: Uscan failed - debug by running 'uscan --verbose'
def scan(self, destdir="""..""", download_version=None):

Invoke uscan to fetch a new upstream version

ReturnsTrue if a new version was downloaded
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.