lib/rigit/commands/build.rb
# Check various scenarios to decide if the file should be overwritten
# or not. These are the scenarios covered by this method:
# 1. The user provided +--focce+ in the command line
# 2. The user answered "overwrite all" or "skip all" when he asked 
#    about the first conflicting file.
# 3. In cases where an additive dir contains a file that was originally
#    new, approved or rejected - we use this existing knowledge (which
#    is stored in +response_log+.
Check various scenarios to decide if the file should be overwritten
or not. These are the scenarios covered by this method:
1. The user provided +--focce+ in the command line
2. The user answered "overwrite all" or "skip all" when he asked
about the first conflicting file.
3. In cases where an additive dir contains a file that was originally
new, approved or rejected - we use this existing knowledge (which
is stored in +response_log+.
Check various scenarios to decide if the file should be overwritten or not . These are the scenarios covered by this method : 1 . The user provided + -- focce + in the command line 2 . The user answered " overwrite all " or " skip all " when he asked about the first conflicting file . 3 . In cases where an additive dir contains a file that was originally new approved or rejected - we use this existing knowledge ( which is stored in + response_log + .
def overwrite_file?(file)
        return response_log[file] if response_log.has_key? file
        response_log[file] = true
        unless overwrite_all or force
          if skip_all
            response_log[file] = false
          elsif File.exist? file
            response_log[file] = prompt_user_to_overwrite file
          end
        end
        response_log[file]
      end
def overwrite_file? ( file ) return response_log [ file ] if response_log . has_key? file response_log [ file ] = true unless overwrite_all or force if skip_all response_log [ file ] = false elsif File . exist? file response_log [ file ] = prompt_user_to_overwrite file end end response_log [ file ] end
Check various scenarios to decide if the file should be overwritten
or not.
Check various scenarios to decide if the file should be overwritten or not .
file
<not_specific>