Show More
@@ -263,6 +263,8 b' def clone(ui, peeropts, source, dest=Non' | |||||
263 | dest = util.urllocalpath(dest) |
|
263 | dest = util.urllocalpath(dest) | |
264 | source = util.urllocalpath(source) |
|
264 | source = util.urllocalpath(source) | |
265 |
|
265 | |||
|
266 | if not dest: | |||
|
267 | raise util.Abort(_("empty destination path is not valid")) | |||
266 | if os.path.exists(dest): |
|
268 | if os.path.exists(dest): | |
267 | if not os.path.isdir(dest): |
|
269 | if not os.path.isdir(dest): | |
268 | raise util.Abort(_("destination '%s' already exists") % dest) |
|
270 | raise util.Abort(_("destination '%s' already exists") % dest) |
@@ -60,8 +60,8 b' class localrepository(repo.repository):' | |||||
60 |
|
60 | |||
61 | if not os.path.isdir(self.path): |
|
61 | if not os.path.isdir(self.path): | |
62 | if create: |
|
62 | if create: | |
63 |
if not os.path.exists( |
|
63 | if not os.path.exists(self.root): | |
64 |
util.makedirs( |
|
64 | util.makedirs(self.root) | |
65 | util.makedir(self.path, notindexed=True) |
|
65 | util.makedir(self.path, notindexed=True) | |
66 | requirements = self._baserequirements(create) |
|
66 | requirements = self._baserequirements(create) | |
67 | if self.ui.configbool('format', 'usestore', True): |
|
67 | if self.ui.configbool('format', 'usestore', True): |
@@ -420,7 +420,7 b' When cloning from a non-copiable reposit' | |||||
420 | recurse infinitely (issue 2528) |
|
420 | recurse infinitely (issue 2528) | |
421 |
|
421 | |||
422 | $ hg clone full.hg '' |
|
422 | $ hg clone full.hg '' | |
423 | abort: * (glob) |
|
423 | abort: empty destination path is not valid | |
424 | [255] |
|
424 | [255] | |
425 |
|
425 | |||
426 | test for http://mercurial.selenic.com/bts/issue216 |
|
426 | test for http://mercurial.selenic.com/bts/issue216 |
@@ -43,7 +43,7 b' Default operation:' | |||||
43 | Invalid dest '' must abort: |
|
43 | Invalid dest '' must abort: | |
44 |
|
44 | |||
45 | $ hg clone . '' |
|
45 | $ hg clone . '' | |
46 | abort: * (glob) |
|
46 | abort: empty destination path is not valid | |
47 | [255] |
|
47 | [255] | |
48 |
|
48 | |||
49 | No update, with debug option: |
|
49 | No update, with debug option: | |
@@ -112,7 +112,7 b' Use --pull:' | |||||
112 | Invalid dest '' with --pull must abort (issue2528): |
|
112 | Invalid dest '' with --pull must abort (issue2528): | |
113 |
|
113 | |||
114 | $ hg clone --pull a '' |
|
114 | $ hg clone --pull a '' | |
115 | abort: * (glob) |
|
115 | abort: empty destination path is not valid | |
116 | [255] |
|
116 | [255] | |
117 |
|
117 | |||
118 | Clone to '.': |
|
118 | Clone to '.': |
General Comments 0
You need to be logged in to leave comments.
Login now