[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] current state of synching upstream?



Excerpts from Tero Tilus's message of Tue Dec 21 06:01:59 -0500 2010:

> > Neither master nor Damien's Maildir clone contain the class
> > Recoverable.  Is this code you added somewhere else?
> 
> This sources not getting saved might be because of that Recoverable
> wrapper class.  YAML marshalling might not be able to digest it.

When I wrote the hook, I referenced the following from
lib/sup/source.rb:

  def load_sources fn=Redwood::SOURCE_FN
    source_array = (Redwood::load_yaml_obj(fn) || []).map { |o| Recoverable.new o }
    @source_mutex.synchronize do
      @sources = Hash[*(source_array).map { |s| [s.id, s] }.flatten]
      @sources_dirty = false
    end
  end

So, after de-marshalling the yaml file, it wraps the object in a
Recoverable.  This class is defined in lib/sup/util.rb.

I'm looking at the code again right now as the Recoverable may be the
key as to why this doesn't get saved...

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk