The name of the bookmark
The SHA of the commit the bookmark is currently on
The Hglib::Repo
the bookmark lives in
The revision number of the commit the bookmark is currently on
Create a new Bookmark
with the given values.
# File lib/hglib/repo/bookmark.rb, line 25
def initialize( repo, bookmark:, node:, rev:, active: false )
@repo = repo
@name = bookmark
@node = node
@rev = rev
@active = active
end
Whether or not the bookmark is currently active
# File lib/hglib/repo/bookmark.rb, line 56
attr_predicate :active
Delete the bookmark from its repository.
# File lib/hglib/repo/bookmark.rb, line 60
def delete
return self.repo.bookmark( self.name, delete: true )
end
Move the bookmark to the specified revision
.
# File lib/hglib/repo/bookmark.rb, line 66
def move_to( revision )
return self.repo.bookmark( self.name, rev: revision, force: true )
end