#NEWLINE# def _iterate_revisions( self , upper , lower ) : #NEWLINE# #INDENT# lower = self . get_revision ( lower ) #NEWLINE# upper = self . get_revision ( upper ) #NEWLINE# orig = ( ( lower . revision if lower else 'base' ) , ( upper . revision if upper else 'base' ) ) #NEWLINE# script = upper #NEWLINE# while ( script != lower ) : #NEWLINE# #INDENT# if ( ( script is None ) and ( lower is not None ) ) : #NEWLINE# #INDENT# raise util . CommandError ( ( 'Revision %s is not an ancestor of %s' % orig ) ) #NEWLINE# #UNINDENT# ( yield script ) #NEWLINE# downrev = script . down_revision #NEWLINE# script = self . _revision_map [ downrev ]