#NEWLINE# def unextend_path( self , extended_path ) : #NEWLINE# #INDENT# 'Remove ClearCase revision and branch informations from path.\n\n        ClearCase paths contain additional informations about branch\n        and file version preceded by @@. This function remove this\n        parts from ClearCase path to make it more readable\n        For example this function convert extended path::\n\n            /vobs/comm@@/main/122/network@@/main/55/sntp\n            @@/main/4/src@@/main/1/sntp.c@@/main/8\n\n        to the the to regular path::\n\n            /vobs/comm/network/sntp/src/sntp.c\n        ' #NEWLINE# if ( '@@' not in extended_path ) : #NEWLINE# #INDENT# return ( HEAD , extended_path ) #NEWLINE# #UNINDENT# unextended_chunks = [ ( b or a ) for ( a , b , foo ) in self . UNEXTENDED . findall ( extended_path . replace ( '@@' , '' ) ) ] #NEWLINE# if sys . platform . startswith ( 'win' ) : #NEWLINE# #INDENT# if unextended_chunks [ 0 ] . endswith ( ':' ) : #NEWLINE# #INDENT# unextended_chunks [ 0 ] = ( '%s\\' % unextended_chunks [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( unextended_chunks [ 0 ] == '/' ) or ( unextended_chunks [ 0 ] == os . sep ) ) : #NEWLINE# #INDENT# unextended_chunks [ 0 ] = '\\\\' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# unextended_path = cpath . realpath ( cpath . join ( * unextended_chunks ) ) #NEWLINE# revision = extended_path . rsplit ( '@@' , 1 ) [ 1 ] #NEWLINE# if revision . endswith ( 'CHECKEDOUT' ) : #NEWLINE# #INDENT# revision = HEAD #NEWLINE# #UNINDENT# return ( revision , unextended_path )