b.t.BasicTags(_Tags) : class documentation

Part of bzrlib.tag View In Hierarchy

Tag storage in an unversioned branch control file.
Method set_tag Add a tag definition to the branch.
Method lookup_tag Return the referent string of a tag
Method get_tag_dict Return a dictionary mapping tags to revision ids.
Method get_reverse_tag_dict Returns a dict with revisions as keys
Method delete_tag Delete a tag definition.
Method merge_to Copy tags between repositories if necessary and possible.
Method rename_revisions Rename revisions in this tags dictionary.
Method _set_tag_dict Replace all tag definitions
Method _serialize_tag_dict Undocumented
Method _deserialize_tag_dict Convert the tag file into a dictionary of tags
Method _merge_to_operation Undocumented
Method _merge_to Undocumented
Method _reconcile_tags Do a two-way merge of two tag dictionaries.

Inherited from _Tags:

Method __init__ Undocumented
Method has_tag Undocumented
def set_tag(self, tag_name, tag_target):
Add a tag definition to the branch.

Behaviour if the tag is already present is not defined (yet).

def lookup_tag(self, tag_name):
Return the referent string of a tag
def get_tag_dict(self):
Return a dictionary mapping tags to revision ids.
def get_reverse_tag_dict(self):
Returns a dict with revisions as keys and a list of tags for that revision as value
def delete_tag(self, tag_name):
Delete a tag definition.
def _set_tag_dict(self, new_dict):
Replace all tag definitions

WARNING: Calling this on an unlocked branch will lock it, and will replace the tags without warning on conflicts.

Parametersnew_dictDictionary from tag name to target.
def _serialize_tag_dict(self, tag_dict):
Undocumented
def _deserialize_tag_dict(self, tag_content):
Convert the tag file into a dictionary of tags
def merge_to(self, to_tags, overwrite=False, ignore_master=False):
Copy tags between repositories if necessary and possible.

This method has common command-line behaviour about handling error cases.

All new definitions are copied across, except that tags that already exist keep their existing definitions.

Parametersto_tagsBranch to receive these tags
overwriteOverwrite conflicting tags in the target branch
ignore_masterDo not modify the tags in the target's master branch (if any). Default is false (so the master will be updated). New in bzr 2.3.
ReturnsTuple with tag_updates and tag_conflicts. tag_updates is a dictionary with new tags, None is used for removed tags tag_conflicts is a set of tags that conflicted, each of which is (tagname, source_target, dest_target), or None if no copying was done.
def _merge_to_operation(self, operation, to_tags, overwrite, ignore_master):
Undocumented
def _merge_to(self, to_tags, source_dict, overwrite):
Undocumented
def rename_revisions(self, rename_map):
Rename revisions in this tags dictionary.
Parametersrename_mapDictionary mapping old revids to new revids
def _reconcile_tags(self, source_dict, dest_dict, overwrite):

Do a two-way merge of two tag dictionaries.

  • only in source => source value
  • only in destination => destination value
  • same definitions => that
  • different definitions => if overwrite is False, keep destination value and give a warning, otherwise use the source value
Returns(result_dict, updates, [(conflicting_tag, source_target, dest_target)])
API Documentation for Bazaar, generated by pydoctor at 2019-08-20 00:32:01.