Package sonia.scm.repository
Class Tag
java.lang.Object
sonia.scm.repository.Tag
Represents a tag in a repository.
- Since:
- 1.18
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSignature
(Signature signature) getDate()
Depending on the underlying source code management system (like git or hg) and depending on the type of this tag (for example git has lightweight and annotated tags), this date has different meaning.
-
Field Details
-
VALID_REV
- See Also:
-
VALID_REV_PATTERN
-
-
Constructor Details
-
Tag
-
Tag
Constructs a new tag.- Parameters:
name
- name of the tagrevision
- tagged revisiondate
- the creation timestamp (milliseconds) of the tag- Since:
- 2.5.0
-
Tag
Constructs a new tag.- Parameters:
name
- name of the tagrevision
- tagged revisiondate
- the creation timestamp (milliseconds) of the tagdeletable
- whether this tag can be deleted- Since:
- 2.11.0
-
-
Method Details
-
getDate
Depending on the underlying source code management system (like git or hg) and depending on the type of this tag (for example git has lightweight and annotated tags), this date has different meaning. For annotated tags in git, this is the date the tag was created. In other cases (for lightweight tags in git or all tags in hg) this is the date of the referenced changeset.Please note, that the date is retrieved in a best-effort fashion. In certain situations (for example if this tag is announced in a pre or post receive hook), it might not be available. In these cases, this method returns an empty
Optional
.- Since:
- 2.5.0
-
addSignature
-