Package gbp :: Package git :: Module modifier :: Class GitModifier
[hide private]
[frames] | no frames]

Class GitModifier

object --+
         |
        GitModifier

Stores authorship/comitter information

Instance Methods [hide private]
 
__init__(self, name=None, email=None, date=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_get_env(self, who)
Get author or comitter information as env var dictionary
dict
get_author_env(self)
Get env vars for authorship information
dict
get_committer_env(self)
Get env vars for comitter information
 
__getitem__(self, key)
 
keys(self)
 
items(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, email=None, date=None)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_author_env(self)

 

Get env vars for authorship information

>>> g = GitModifier("foo", "bar")
>>> g.get_author_env()
{'GIT_AUTHOR_EMAIL': 'bar', 'GIT_AUTHOR_NAME': 'foo'}
Returns: dict
Author information suitable to use as environment variables

get_committer_env(self)

 

Get env vars for comitter information

>>> g = GitModifier("foo", "bar")
>>> g.get_committer_env()
{'GIT_COMMITTER_NAME': 'foo', 'GIT_COMMITTER_EMAIL': 'bar'}
Returns: dict
Commiter information suitable to use as environment variables