class SafeDb::Commit

The commit use case commits any changes made to the safe book into master. This is straightforward if the master's state has not been forwarded by a ckeckin from another (shell) branch.

The mechanics of a simple in-sync commit is to

Public Instance Methods

execute() click to toggle source

The commit use case commits any changes made to the safe book into master. This is straightforward if the master's state has not been forwarded by a ckeckin from another (shell) branch.

# File lib/controller/book/commit.rb, line 23
def execute

  @book.print_book_mark()

  unless @book.can_commit?()

    puts "Cannot commit as master has moved forward."
    puts "First see the difference, then refresh, and then commit."
    puts ""
    puts "   safe diff"
    puts "   safe refresh"
    puts "   safe commit"
    puts ""

    return

  end

  EvolveState.commit( @book )

  puts "Commit at #{TimeStamp.readable()} successful."
  puts ""


end