Show More
@@ -43,14 +43,15 b' def lfconvert(ui, src, dest, *pats, **op' | |||||
43 | else: |
|
43 | else: | |
44 | tolfile = True |
|
44 | tolfile = True | |
45 | size = lfutil.getminsize(ui, True, opts.get('size'), default=None) |
|
45 | size = lfutil.getminsize(ui, True, opts.get('size'), default=None) | |
|
46 | ||||
|
47 | if not hg.islocal(src): | |||
|
48 | raise util.Abort(_('%s is not a local Mercurial repo') % src) | |||
|
49 | if not hg.islocal(dest): | |||
|
50 | raise util.Abort(_('%s is not a local Mercurial repo') % dest) | |||
|
51 | ||||
46 | rsrc = hg.repository(ui, src) |
|
52 | rsrc = hg.repository(ui, src) | |
47 | if not rsrc.local(): |
|
|||
48 | raise util.Abort(_('%s is not a local Mercurial repo') % src) |
|
|||
49 |
|
||||
50 | ui.status(_('initializing destination %s\n') % dest) |
|
53 | ui.status(_('initializing destination %s\n') % dest) | |
51 | rdst = hg.repository(ui, dest, create=True) |
|
54 | rdst = hg.repository(ui, dest, create=True) | |
52 | if not rdst.local(): |
|
|||
53 | raise util.Abort(_('%s is not a local Mercurial repo') % dest) |
|
|||
54 |
|
55 | |||
55 | success = False |
|
56 | success = False | |
56 | try: |
|
57 | try: |
@@ -45,6 +45,12 b'' | |||||
45 | $ cd .. |
|
45 | $ cd .. | |
46 |
|
46 | |||
47 | "lfconvert" error cases |
|
47 | "lfconvert" error cases | |
|
48 | $ hg lfconvert http://localhost/foo foo | |||
|
49 | abort: http://localhost/foo is not a local Mercurial repo | |||
|
50 | [255] | |||
|
51 | $ hg lfconvert foo ssh://localhost/foo | |||
|
52 | abort: ssh://localhost/foo is not a local Mercurial repo | |||
|
53 | [255] | |||
48 | $ hg lfconvert nosuchrepo foo |
|
54 | $ hg lfconvert nosuchrepo foo | |
49 | abort: repository nosuchrepo not found! |
|
55 | abort: repository nosuchrepo not found! | |
50 | [255] |
|
56 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now