##// END OF EJS Templates
convert/svn: handle non-local svn destination paths (issue3142)...
Patrick Mezard -
r17247:6d51a0c7 stable
parent child Browse files
Show More
@@ -1020,26 +1020,25 class svn_sink(converter_sink, commandli
1020 self.wc = None
1020 self.wc = None
1021 self.cwd = os.getcwd()
1021 self.cwd = os.getcwd()
1022
1022
1023 path = os.path.realpath(path)
1024
1025 created = False
1023 created = False
1026 if os.path.isfile(os.path.join(path, '.svn', 'entries')):
1024 if os.path.isfile(os.path.join(path, '.svn', 'entries')):
1027 self.wc = path
1025 self.wc = os.path.realpath(path)
1028 self.run0('update')
1026 self.run0('update')
1029 else:
1027 else:
1030 wcpath = os.path.join(os.getcwd(), os.path.basename(path) + '-wc')
1028 if not re.search(r'^(file|http|https|svn|svn\+ssh)\://', path):
1029 path = os.path.realpath(path)
1030 if os.path.isdir(os.path.dirname(path)):
1031 if not os.path.exists(os.path.join(path, 'db', 'fs-type')):
1032 ui.status(_('initializing svn repository %r\n') %
1033 os.path.basename(path))
1034 commandline(ui, 'svnadmin').run0('create', path)
1035 created = path
1036 path = util.normpath(path)
1037 if not path.startswith('/'):
1038 path = '/' + path
1039 path = 'file://' + path
1031
1040
1032 if os.path.isdir(os.path.dirname(path)):
1041 wcpath = os.path.join(os.getcwd(), os.path.basename(path) + '-wc')
1033 if not os.path.exists(os.path.join(path, 'db', 'fs-type')):
1034 ui.status(_('initializing svn repository %r\n') %
1035 os.path.basename(path))
1036 commandline(ui, 'svnadmin').run0('create', path)
1037 created = path
1038 path = util.normpath(path)
1039 if not path.startswith('/'):
1040 path = '/' + path
1041 path = 'file://' + path
1042
1043 ui.status(_('initializing svn working copy %r\n')
1042 ui.status(_('initializing svn working copy %r\n')
1044 % os.path.basename(wcpath))
1043 % os.path.basename(wcpath))
1045 self.run0('checkout', path, wcpath)
1044 self.run0('checkout', path, wcpath)
General Comments 0
You need to be logged in to leave comments. Login now