From 95c2d95f42385aabdb961593dd9e6d1d5d494457 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 2 Dec 2015 10:00:40 +0000 Subject: Changed the word "revision" to "snapshot" everywhere This is for consistency and understanding. We use btrfs snapshots, so this makes sense. To me at least. --- lib/byteback/restore.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/byteback/restore.rb b/lib/byteback/restore.rb index e2df3fe..82fab82 100644 --- a/lib/byteback/restore.rb +++ b/lib/byteback/restore.rb @@ -5,9 +5,9 @@ module Byteback class Restore - def self.find(byteback_root, revision, paths) + def self.find(byteback_root, snapshot, paths) x = Byteback::Restore.new(byteback_root) - x.revision = revision + x.snapshot = snapshot x.find(paths) return x end @@ -39,15 +39,15 @@ module Byteback # @byteback_root = File.expand_path(byteback_root) @now = Time.now - @revision = "*" + @snapshot = "*" @results = [] end - def revision=(r) + def snapshot=(r) if r =~ /^[a-z0-9:\+\*\-]+$/i - @revision = r + @snapshot = r else - puts "*** Warning: Bad revision #{r.inspect}" + puts "*** Warning: Bad snapshot #{r.inspect}" end end @@ -64,7 +64,7 @@ module Byteback seen = [] @results = paths.collect do |path| - Dir.glob(File.expand_path(File.join(@byteback_root, @revision, path))).collect do |f| + Dir.glob(File.expand_path(File.join(@byteback_root, @snapshot, path))).collect do |f| restore_file = Byteback::RestoreFile.new(f, @byteback_root, @now) end end.flatten.sort{|a,b| [a.path, a.snapshot_time] <=> [b.path, b.snapshot_time]} -- cgit v1.2.1