#NEWLINE# def parse_external_prop( lines ) : #NEWLINE# #INDENT# '\n    Parse the value of a retrieved svn:externals entry.\n\n    possible token setups (with quotng and backscaping in laters versions)\n        URL[@#] EXT_FOLDERNAME\n        [-r#] URL EXT_FOLDERNAME\n        EXT_FOLDERNAME [-r#] URL\n    ' #NEWLINE# externals = [ ] #NEWLINE# for line in lines . splitlines ( ) : #NEWLINE# #INDENT# line = line . lstrip ( ) #NEWLINE# if ( not line ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( sys . version_info < ( 3 , 0 ) ) : #NEWLINE# #INDENT# line = line . encode ( 'utf-8' ) #NEWLINE# #UNINDENT# line = shlex . split ( line ) #NEWLINE# if ( sys . version_info < ( 3 , 0 ) ) : #NEWLINE# #INDENT# line = [ x . decode ( 'utf-8' ) for x in line ] #NEWLINE# #UNINDENT# if urlparse . urlsplit ( line [ ( - 1 ) ] ) [ 0 ] : #NEWLINE# #INDENT# external = line [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# external = line [ ( - 1 ) ] #NEWLINE# #UNINDENT# external = decode_as_string ( external , encoding = 'utf-8' ) #NEWLINE# externals . append ( os . path . normpath ( external ) ) #NEWLINE# #UNINDENT# return externals