Sha256: be5cddf0dc4dca93f0ac2d49f364493dda75126d0096aa8b5e592d9962a3afc0
Contents?: true
Size: 621 Bytes
Versions: 1
Compression:
Stored size: 621 Bytes
Contents
command :"what-changed" do |c| c.workflow :hg c.desc "Which commits have touched this file?" c.opt :limit, "Limit how many revisions to show", :short => "-l", :type => :integer, :default => -1 c.opt :template, "Which template to use while printing", :short => "-t", :type => :string, :default => "default" c.on_run do |opts, args| repo = opts[:repository] file = repo.versioned_file args.shift revs = file.map {|vf| vf.link_rev } revs = revs[-opts[:limit]..-1] unless opts[:limit] <= 0 revs.reverse.each do |rev| Amp::UI.say repo[rev].to_templated_s(opts) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amp-0.5.3 | lib/amp/commands/commands/workflows/hg/what_changed.rb |