# File wfo/main.rb, line 250
  def do_commit(argv)
    WebClient.do {
      ws = argv_to_workareas(argv)
      ws.reject! {|w| !w.modified? }
      up_to_date = true
      as = []
      ws.each {|w|
        accessor = w.make_accessor
        remote_text = accessor.current_text
        local_text = w.local_text
        original_text = w.original_text
        if remote_text != original_text
          puts "not up-to-date : #{w.filename}"
          up_to_date = false
        end
        as << [w, accessor, local_text]
      }
      exit 1 if !up_to_date
      as.each {|w, accessor, local_text|
        accessor.replace_text local_text
        accessor.commit
        accessor2 = accessor.reload
        if accessor2.current_text != local_text
          backup_filename = w.make_backup(local_text)
          puts "commited not exactly.  local file backup: #{backup_filename}"
          w.local_text = accessor2.current_text
          w.original_text = accessor2.current_text
          w.store
        else
          w.original_text = local_text
          w.store_info
        end
        puts w.filename
      }
    }
  end