def tag_create(repo, tag, author=None, message=None, annotated=False, objectish='HEAD', tag_time=None, tag_timezone=None):
 with open_repo_closing(repo) as r:
  object = parse_object(r, objectish)
  if annotated:
   tag_obj = Tag()
   if (author is None):
    author = r._get_user_identity()
   tag_obj.tagger = author
   tag_obj.message = message
   tag_obj.name = tag
   tag_obj.object = (type(object), object.id)
   if (tag_time is None):
    tag_time = int(time.time())
   tag_obj.tag_time = tag_time
   if (tag_timezone is None):
    tag_timezone = 0
   elif isinstance(tag_timezone, str):
    tag_timezone = parse_timezone(tag_timezone)
   tag_obj.tag_timezone = tag_timezone
   r.object_store.add_object(tag_obj)
   tag_id = tag_obj.id
  else:
   tag_id = object.id
  r.refs[('refs/tags/' + tag)] = tag_id

def tag_create ( repo , tag , author = None , message = None , annotated = False , objectish = 'HEAD' , tag_time = None , tag_timezone = None ) : with open_repo_closing ( repo ) as r : object = parse_object ( r , objectish ) if annotated : tag_obj = Tag ( ) if ( author is None ) : author = r . _get_user_identity ( ) tag_obj . tagger = author tag_obj . message = message tag_obj . name = tag tag_obj . object = ( type ( object ) , object . id ) if ( tag_time is None ) : tag_time = int ( time . time ( ) ) tag_obj . tag_time = tag_time if ( tag_timezone is None ) : tag_timezone = 0 elif isinstance ( tag_timezone , str ) : tag_timezone = parse_timezone ( tag_timezone ) tag_obj . tag_timezone = tag_timezone r . object_store . add_object ( tag_obj ) tag_id = tag_obj . id else : tag_id = object . id r . refs [ ( 'refs/tags/' + tag ) ] = tag_id
create a new vocabulary tag .