Sha256: 43f5042df6c3e83637652cea5f47eed43329f356574da10ee7b473811f0c2407

Contents?: true

Size: 1.56 KB

Versions: 50

Compression:

Stored size: 1.56 KB

Contents

module Redcar
  module Scm
    class ScmChangesMirror
      module Change
        include Redcar::Tree::Mirror::NodeMirror
        
        #####
        # NodeMirror stuff
        ###
        def text
          "#{File.basename(path)} (#{File.dirname(path)})"
        end
        
        def tooltip_text
          text
        end
        
        def icon
          :file
        end
        
        def leaf?
          true
        end
        
        def to_data
          path
        end
        
        #####
        # Change definition stuff
        ###
        
        # The status is an array of symbols indicating the status of this change
        # and hence what operations can be performed on it. This is only 
        # consulted if the SCM supports the :index command.
        #
        # Possible values and their implications:
        #   :new - can be passed to index_add, index_ignore
        #   :unmerged - The file is in a conflicted state. 
        #               Can be passed to index_save or index_delete
        #   :indexed - can be passed to index_revert, index_unsave
        #   :deleted - can be passed to index_restore, index_unsave
        #   :missing - can be passed to index_restore, index_delete
        #   :changed - can be passed to index_save, index_unsave
        #   :commitable - can be passed to commit!
        #                 Intended to represent subprojects.
        def status
          [:new]
        end
        
        def path
          ''
        end
        
        def diff
          nil
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
redcar-0.13 plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.5dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.4dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.3dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.2dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.1dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-0.12.1 plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.13.0dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-0.12 plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.27dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.26dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.25dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.24dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.23dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.22dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.21dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.20dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.19dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.18dev plugins/scm/lib/scm/scm_changes_mirror/change.rb
redcar-dev-0.12.17dev plugins/scm/lib/scm/scm_changes_mirror/change.rb