Class: Mercurial::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/mercurial-ruby/tag.rb

Overview

The class represents Mercurial tag. Obtained by running an hg tags command.

The class represents Tag object itself, TagFactory is responsible for assembling instances of Tag. For the list of all possible tag-related operations please check TagFactory.

For general information on Mercurial tags:

mercurial.selenic.com/wiki/Tag

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository, name, hash_id) ⇒ Tag

Returns a new instance of Tag.



25
26
27
28
29
# File 'lib/mercurial-ruby/tag.rb', line 25

def initialize(repository, name, hash_id)
  @repository = repository
  @name       = name
  @hash_id    = hash_id
end

Instance Attribute Details

#hash_idObject (readonly)

Mercurial changeset ID of the tag. 40-chars long SHA1 hash.



23
24
25
# File 'lib/mercurial-ruby/tag.rb', line 23

def hash_id
  @hash_id
end

#nameObject (readonly)

Name of the tag.



20
21
22
# File 'lib/mercurial-ruby/tag.rb', line 20

def name
  @name
end

#repositoryObject (readonly)

Instance of Repository.



17
18
19
# File 'lib/mercurial-ruby/tag.rb', line 17

def repository
  @repository
end