Class: AccuHook::Accurev::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/accuhook/command.rb

Instance Method Summary collapse

Instance Method Details

#add(file_path) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/accuhook/command.rb', line 9

def add(file_path)
  if File.directory?(file_path) # Recursively add directory (`accurev add -x -R {Dir}`)
    execute("add -x -R \"#{file_path}\"")
  else  # Add single file (`accurev add {File}`)
    execute("add \"#{file_path}\"")
  end
end

#defunct(file_path, message) ⇒ Object



21
22
23
# File 'lib/accuhook/command.rb', line 21

def defunct(file_path, message)
  execute("defunct -c \"#{@last_commit_message}\" \"#{diff.a_path}\"")
end

#keep(file_path, message) ⇒ Object



17
18
19
# File 'lib/accuhook/command.rb', line 17

def keep(file_path, message)
  execute("keep -c \"#{message}\" \"#{file_path}\"")
end