Permalink
Browse files

Expanded filepath for lock, unlock and info commands.

Removed first argument (filepath) in lock and unlock commands. Using @options instead.
  • Loading branch information...
1 parent 40209b1 commit 7c99ed8bf57643d974323b9120739c4961fc286e psyche committed Oct 9, 2008
Showing with 5 additions and 5 deletions.
  1. +2 −2 lib/piston/commands/lock_unlock.rb
  2. +3 −3 lib/piston/working_copy.rb
@@ -5,8 +5,8 @@ module Commands
class LockUnlock < Piston::Commands::Base
attr_reader :options
- def run(wcdir, lock)
- working_copy = working_copy!(wcdir)
+ def run(lock)
+ working_copy = working_copy!(File.expand_path(options[:wcdir]))
values = working_copy.recall
values["lock"] = lock
@@ -18,7 +18,7 @@ def guess(path)
end
raise UnhandledWorkingCopy, "Don't know what working copy type #{path} is." if handler.nil?
- handler.new(path)
+ handler.new(File.expand_path(path))
end
@@handlers = Array.new
@@ -55,7 +55,7 @@ def to_s
def exist?
@path.exist? && @path.directory?
end
-
+
def pistonized?
yaml_path.exist? && yaml_path.file?
end
@@ -119,7 +119,7 @@ def recall
def finalize
logger.debug {"Finalizing #{path}"}
end
-
+
# Returns basic information about this working copy.
def info
recall

0 comments on commit 7c99ed8

Please sign in to comment.