An entry in a repository's revision log.
Return the Array of bookmarks corresponding to the entry (if any)
Return the name of the branch the commit is on
Return the description from the entry
The diff of the commit, if –patch was specified.
The files affected by the commit, if run with `verbose: true`.
Return the node (changeset ID) from the entry
Return the changeset IDs of the parents of the entry
Return the phase from the entry
Return the revision number from the entry
Return the description from the entry
Return the Array of the entry's tags
Return the name and email of the committing user
Create a new log entry from the raw entryhash
.
# File lib/hglib/repo/log_entry.rb, line 31
def initialize( entryhash )
@bookmarks = entryhash[ :bookmarks ]
@branch = entryhash[ :branch ]
@date = entryhash[ :date ]
@desc = entryhash[ :desc ]
@node = entryhash[ :node ]
@parents = entryhash[ :parents ]
@phase = entryhash[ :phase ]
@rev = entryhash[ :rev ]
@tags = entryhash[ :tags ]
@user = entryhash[ :user ]
@date = entryhash[ :date ]
@files = entryhash[ :files ] || []
end
Return the shortened changeset ID (in the form {rev}:{shortnode})
# File lib/hglib/repo/log_entry.rb, line 105
def changeset
return "%d:%s" % [ self.rev, self.node[0,12] ]
end
The Time the revision associated with the entry was committed
# File lib/hglib/repo/log_entry.rb, line 98
def date
return Time.at( @date[0] )
end
Return a human-readable representation of the LogEntry
as a String.
# File lib/hglib/repo/log_entry.rb, line 111
def inspect
parts = []
parts += self.tags.map {|t| "##{t}" }
parts += self.bookmarks.map {|b| "@#{b}" }
return "#<%p:#%x %s {%s} %p%s>" % [
self.class,
self.object_id * 2,
self.changeset,
self.date,
self.summary,
parts.empty? ? '' : " " + parts.join(' ')
]
end