public
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
commit  a2ef04d7498a9f3dd83cc4ee22b14eeb218f9881
tree    374b0c68d01dd9639cc30b3429ae6b59a35c62a7
parent  10863f19e2e48c704983bb1618aacd0f29ebae9c
piston / lib / piston / commands / base.rb
100644 39 lines (31 sloc) 0.659 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module Piston
  module Commands
    class Base
      class << self
        def logger
          @@logger ||= Log4r::Logger["main"]
        end
      end
 
      attr_reader :options
 
      def initialize(options={})
        @options = options
        logger.debug {"#{self.class.name} with options #{options.inspect}"}
      end
 
      def verbose
        @options[:verbose]
      end
 
      def force
        @options[:force]
      end
 
      def quiet
        @options[:quiet]
      end
 
      def logger
        self.class.logger
      end
      
      def guess_wc(wcdir)
        working_copy = Piston::WorkingCopy.guess(wcdir)
      end
    end
  end
end