Permalink
Browse files

add -x hex mode for "forwardings".

  • Loading branch information...
1 parent 4c75c08 commit 07043e6443ef3cf20579f8f30cda767d6c527074 Robey Pointer committed Aug 30, 2010
Showing with 4 additions and 1 deletion.
  1. +1 −1 lib/gizzard/commands.rb
  2. +3 −0 lib/gizzmo.rb
@@ -86,7 +86,7 @@ def run
end.reject do |forwarding|
@command_options.table_ids && !@command_options.table_ids.include?(forwarding.table_id)
end.each do |forwarding|
- output [ forwarding.table_id, forwarding.base_id, forwarding.shard_id.to_unix ].join("\t")
+ output [ forwarding.table_id, @command_options.hex ? ("%015x" % forwarding.base_id) : forwarding.base_id, forwarding.shard_id.to_unix ].join("\t")
end
end
end
View
@@ -128,6 +128,9 @@ def separators(opts, string)
subcommand_options.table_ids ||= []
subcommand_options.table_ids += table_ids.split(",").map { |s| s.to_i }
end
+ opts.on("-x", "--hex", "Show base ids in hex") do
+ subcommand_options.hex = true
+ end
end,
'unwrap' => OptionParser.new do |opts|
opts.banner = "Usage: #{zero} unwrap SHARD_ID_TO_REMOVE [MORE SHARD_IDS]"

0 comments on commit 07043e6

Please sign in to comment.