<s> import api <EOL> class RebaseError ( api . APIError ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class InvalidRebaseId ( RebaseError ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , value ) : <EOL> """<STR_LIT>""" <EOL> super ( InvalidRebaseId , self ) . __init__ ( "<STR_LIT>" % value ) <EOL> self . value = value <EOL> class Rebase ( api . APIObject ) : <EOL> """<STR_LIT>""" <EOL> def __int__ ( self ) : <EOL> return self . id <EOL> def __hash__ ( self ) : <EOL> return hash ( int ( self ) ) <EOL> def __eq__ ( self , other ) : <EOL> return int ( self ) == int ( other ) <EOL> @ property <EOL> def id ( self ) : <EOL> return self . _impl . id <EOL> @ property <EOL> def review ( self ) : <EOL> return self . _impl . getReview ( self . critic ) <EOL> @ property <EOL> def old_head ( self ) : <EOL> return self . _impl . getOldHead ( self . critic ) <EOL> @ property <EOL> def new_head ( self ) : <EOL> return self . _impl . getNewHead ( self . critic ) <EOL> @ property <EOL> def creator ( self ) : <EOL> return self . _impl . getCreator ( self . critic ) <EOL> class HistoryRewrite ( Rebase ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class MoveRebase ( Rebase ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def old_upstream ( self ) : <EOL> return self . _impl . getOldUpstream ( self . critic ) <EOL> @ property <EOL> def new_upstream ( self ) : <EOL> return self . _impl . getNewUpstream ( self . critic ) <EOL> @ property <EOL> def equivalent_merge ( self ) : <EOL> return self . _impl . getEquivalentMerge ( self . critic ) <EOL> @ property <EOL> def replayed_rebase ( self ) : <EOL> return self . _impl . getReplayedRebase ( self . critic ) <EOL> def fetch ( critic , rebase_id ) : <EOL> """<STR_LIT>""" <EOL> import api . impl <EOL> assert isinstance ( critic , api . critic . Critic ) <EOL> return api . impl . log . rebase . fetch ( critic , rebase_id ) <EOL> def fetchAll ( critic , review = None ) : <EOL> """<STR_LIT>""" <EOL> import api . impl <EOL> assert isinstance ( critic , api . critic . Critic ) <EOL> assert review is None or isinstance ( review , api . review . Review ) <EOL> return api . impl . log . rebase . fetchAll ( critic , review ) </s>
