Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Expanded filepath for lock, unlock and info commands.
Browse files Browse the repository at this point in the history
Removed first argument (filepath) in lock and unlock commands. Using @options instead.
  • Loading branch information
psyche committed Oct 9, 2008
1 parent 40209b1 commit 7c99ed8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/piston/commands/lock_unlock.rb
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/piston/working_copy.rb
Expand Up @@ -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
Expand Down Expand Up @@ -55,7 +55,7 @@ def to_s
def exist?
@path.exist? && @path.directory?
end

def pistonized?
yaml_path.exist? && yaml_path.file?
end
Expand Down Expand Up @@ -119,7 +119,7 @@ def recall
def finalize
logger.debug {"Finalizing #{path}"}
end

# Returns basic information about this working copy.
def info
recall
Expand Down

0 comments on commit 7c99ed8

Please sign in to comment.