#NEWLINE# def get_unmerged_notebooks( self ) : #NEWLINE# #INDENT# ( client , repopath ) = get_hlib_client_and_path ( ) #NEWLINE# unmerged = [ path for ( status , path ) in client . resolve ( listfiles = True ) if ( local_nb_str == 'U' ) ] #NEWLINE# if ( not unmerged ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# nb_diff = [ ] #NEWLINE# local_remote_hash = client . identify ( id = True ) . split ( '+' ) #NEWLINE# local_hash = local_remote_hash [ 0 ] #NEWLINE# remote_hash = local_remote_hash [ 1 ] #NEWLINE# base_hash = client . log ( ( ( ( ( "ancestor('" + local_hash ) + "', '" ) + remote_hash ) + "')" ) ) [ 0 ] [ 1 ] #NEWLINE# for ( status , path ) in client . status ( all = True ) : #NEWLINE# #INDENT# if ( path in unmerged ) : #NEWLINE# #INDENT# abspath = os . path . join ( repopath , path ) #NEWLINE# name = os . path . basename ( abspath ) #NEWLINE# local_nb_str = client . cat ( [ name ] , rev = local_hash ) #NEWLINE# remote_nb_str = client . cat ( [ name ] , rev = remote_hash ) #NEWLINE# base_nb_str = client . cat ( [ name ] , rev = base_hash ) #NEWLINE# local_notebook = StringIO . StringIO ( local_nb_str ) #NEWLINE# remote_notebook = StringIO . StringIO ( remote_nb_str ) #NEWLINE# base = StringIO . StringIO ( base_nb_str ) #NEWLINE# nb_diff . append ( ( local_notebook , base , remote_notebook , abspath ) ) #NEWLINE# #UNINDENT# #UNINDENT# return super ( HgAdapter , self ) . filter_unmerged_notebooks ( nb_diff )