comparison hgext/convert/subversion.py @ 16687:e34106fa0dc3

cleanup: "raise SomeException()" -> "raise SomeException"
author Brodie Rao <brodie@sf.io>
date Sat, 12 May 2012 16:00:58 +0200
parents 525fdb738975
children cfb6682961b8
comparison
equal deleted inserted replaced
16686:67964cda8701 16687:e34106fa0dc3
868 raise 868 raise
869 869
870 def getfile(self, file, rev): 870 def getfile(self, file, rev):
871 # TODO: ra.get_file transmits the whole file instead of diffs. 871 # TODO: ra.get_file transmits the whole file instead of diffs.
872 if file in self.removed: 872 if file in self.removed:
873 raise IOError() 873 raise IOError
874 mode = '' 874 mode = ''
875 try: 875 try:
876 new_module, revnum = revsplit(rev)[1:] 876 new_module, revnum = revsplit(rev)[1:]
877 if self.module != new_module: 877 if self.module != new_module:
878 self.module = new_module 878 self.module = new_module
889 mode = ("svn:special" in info) and 'l' or mode 889 mode = ("svn:special" in info) and 'l' or mode
890 except SubversionException, e: 890 except SubversionException, e:
891 notfound = (svn.core.SVN_ERR_FS_NOT_FOUND, 891 notfound = (svn.core.SVN_ERR_FS_NOT_FOUND,
892 svn.core.SVN_ERR_RA_DAV_PATH_NOT_FOUND) 892 svn.core.SVN_ERR_RA_DAV_PATH_NOT_FOUND)
893 if e.apr_err in notfound: # File not found 893 if e.apr_err in notfound: # File not found
894 raise IOError() 894 raise IOError
895 raise 895 raise
896 if mode == 'l': 896 if mode == 'l':
897 link_prefix = "link " 897 link_prefix = "link "
898 if data.startswith(link_prefix): 898 if data.startswith(link_prefix):
899 data = data[len(link_prefix):] 899 data = data[len(link_prefix):]