flexlate.transactions package

Submodules

flexlate.transactions.transaction module

class flexlate.transactions.transaction.FlexlateTransaction(**data)[source]

Bases: pydantic.main.BaseModel

classmethod cast_data_into_sequence(v)[source]
property commit_message: str
Return type

str

data: Optional[Sequence[Dict[str, Any]]]
id: pydantic.types.UUID4
out_root: Optional[pathlib.Path]
classmethod parse_commit_message(message)[source]
Return type

FlexlateTransaction

target: Optional[str]
type: flexlate.transactions.transaction.TransactionType
exception flexlate.transactions.transaction.HitInitialCommit[source]

Bases: Exception

exception flexlate.transactions.transaction.HitMergeCommit[source]

Bases: Exception

class flexlate.transactions.transaction.TransactionType(value)[source]

Bases: str, enum.Enum

An enumeration.

ADD_OUTPUT = 'add output'
ADD_SOURCE = 'add source'
ADD_SOURCE_AND_OUTPUT = 'add source and output'
BOOTSTRAP = 'bootstrap'
REMOVE_OUTPUT = 'remove output'
REMOVE_SOURCE = 'remove source'
SYNC = 'sync'
UPDATE = 'update'
UPDATE_TARGET_VERSION = 'update template source target version'
flexlate.transactions.transaction.assert_has_at_least_n_transactions(repo, n, merged_branch_name, template_branch_name)[source]
flexlate.transactions.transaction.assert_last_commit_was_in_a_flexlate_transaction(repo, merged_branch_name, template_branch_name)[source]
flexlate.transactions.transaction.assert_that_all_commits_between_two_are_flexlate_transactions_or_merges(repo, start, end, merged_branch_name, template_branch_name)[source]
flexlate.transactions.transaction.create_transaction_commit_message(commit_message, transaction)[source]
Return type

str

flexlate.transactions.transaction.find_earliest_commit_that_was_part_of_transaction(repo, transaction, merged_branch_name, template_branch_name)[source]
Return type

Commit

flexlate.transactions.transaction.find_earliest_merge_commit_for_transaction(repo, transaction, merged_branch_name, template_branch_name)[source]
Return type

Commit

flexlate.transactions.transaction.find_last_transaction_from_commit(commit, merged_branch_name, template_branch_name)[source]
Return type

FlexlateTransaction

flexlate.transactions.transaction.reset_last_transaction(repo, transaction, merged_branch_name, template_branch_name)[source]

flexlate.transactions.undoer module

class flexlate.transactions.undoer.Undoer[source]

Bases: object

undo_transaction(repo, merged_branch_name='flexlate-output', base_merged_branch_name='flexlate-output', template_branch_name='flexlate-templates', base_template_branch_name='flexlate-templates')[source]
undo_transactions(repo, num_transactions=1, merged_branch_name='flexlate-output', base_merged_branch_name='flexlate-output', template_branch_name='flexlate-templates', base_template_branch_name='flexlate-templates')[source]