Sha256: 04acc72a7d8ccbd2890a255d85148aa0daa0812f818271efe11628c5c2cadf4d
Contents?: true
Size: 739 Bytes
Versions: 25
Compression:
Stored size: 739 Bytes
Contents
command :heads do |c| c.desc "Prints the heads of the repository." c.add_opt :rev, "show only heads which are descendants of rev", {:short => "-r"} c.add_opt :active, "show only active heads", {:short => "-a"} c.add_opt :template, "Which template to use while printing", {:short => "-t", :type => :string, :default => "default"} c.on_run do |options, args| repo = options[:repository] start = options[:rev] ? repo.lookup(options[:rev]) : nil closed = options[:active] if args.size == 0 heads = repo.heads(start, :closed => closed) else #branch shit end options.merge!({:template_type => :log}) heads.each do |n| puts repo[n].to_templated_s(options) end end end
Version data entries
25 entries across 5 versions & 2 rubygems