Show More
@@ -69,6 +69,15 b' def defaultdest(source):' | |||||
69 | '''return default destination of clone if none is given''' |
|
69 | '''return default destination of clone if none is given''' | |
70 | return os.path.basename(os.path.normpath(source)) |
|
70 | return os.path.basename(os.path.normpath(source)) | |
71 |
|
71 | |||
|
72 | def localpath(path): | |||
|
73 | if path.startswith('file://localhost/'): | |||
|
74 | return path[16:] | |||
|
75 | if path.startswith('file://'): | |||
|
76 | return path[7:] | |||
|
77 | if path.startswith('file:'): | |||
|
78 | return path[5:] | |||
|
79 | return path | |||
|
80 | ||||
72 | def clone(ui, source, dest=None, pull=False, rev=None, update=True, |
|
81 | def clone(ui, source, dest=None, pull=False, rev=None, update=True, | |
73 | stream=False): |
|
82 | stream=False): | |
74 | """Make a copy of an existing repository. |
|
83 | """Make a copy of an existing repository. | |
@@ -116,15 +125,6 b' def clone(ui, source, dest=None, pull=Fa' | |||||
116 | dest = defaultdest(source) |
|
125 | dest = defaultdest(source) | |
117 | ui.status(_("destination directory: %s\n") % dest) |
|
126 | ui.status(_("destination directory: %s\n") % dest) | |
118 |
|
127 | |||
119 | def localpath(path): |
|
|||
120 | if path.startswith('file://localhost/'): |
|
|||
121 | return path[16:] |
|
|||
122 | if path.startswith('file://'): |
|
|||
123 | return path[7:] |
|
|||
124 | if path.startswith('file:'): |
|
|||
125 | return path[5:] |
|
|||
126 | return path |
|
|||
127 |
|
||||
128 | dest = localpath(dest) |
|
128 | dest = localpath(dest) | |
129 | source = localpath(source) |
|
129 | source = localpath(source) | |
130 |
|
130 |
General Comments 0
You need to be logged in to leave comments.
Login now