def tags(repo_dir=None):
 tags = {}
 for (n, c) in list_refs(repo_dir=repo_dir, limit_to_tags=True):
  assert n.startswith('refs/tags/')
  name = n[10:]
  if (not (c in tags)):
   tags[c] = []
  tags[c].append(name)
 return tags

def tags ( repo_dir = None ) : tags = { } for ( n , c ) in list_refs ( repo_dir = repo_dir , limit_to_tags = True ) : assert n . startswith ( 'refs/tags/' ) name = n [ 10 : ] if ( not ( c in tags ) ) : tags [ c ] = [ ] tags [ c ] . append ( name ) return tags
returns listing of all tags .