#NEWLINE# def direct_parents( self , tip ) : #NEWLINE# #INDENT# "Return all parents of `tip` in the order they're written into the\n        object" #NEWLINE# obj = object_factory . hydrate_object ( self . store [ self ] . data ) #NEWLINE# if isinstance ( obj , RootObject ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , UpdateObject ) : #NEWLINE# #INDENT# return obj . parents #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ( 'Unknown object hydrated %s' % str ( type ( obj ) ) )