Show More
@@ -24,6 +24,8 b' class mercurial_sink(converter_sink):' | |||||
24 | if os.path.isdir(path) and len(os.listdir(path)) > 0: |
|
24 | if os.path.isdir(path) and len(os.listdir(path)) > 0: | |
25 | try: |
|
25 | try: | |
26 | self.repo = hg.repository(self.ui, path) |
|
26 | self.repo = hg.repository(self.ui, path) | |
|
27 | if not self.repo.local(): | |||
|
28 | raise NoRepo(_('%s is not a local Mercurial repo') % path) | |||
27 | ui.status(_('destination %s is a Mercurial repository\n') % |
|
29 | ui.status(_('destination %s is a Mercurial repository\n') % | |
28 | path) |
|
30 | path) | |
29 | except hg.RepoError, err: |
|
31 | except hg.RepoError, err: | |
@@ -33,6 +35,8 b' class mercurial_sink(converter_sink):' | |||||
33 | try: |
|
35 | try: | |
34 | ui.status(_('initializing destination %s repository\n') % path) |
|
36 | ui.status(_('initializing destination %s repository\n') % path) | |
35 | self.repo = hg.repository(self.ui, path, create=True) |
|
37 | self.repo = hg.repository(self.ui, path, create=True) | |
|
38 | if not self.repo.local(): | |||
|
39 | raise NoRepo(_('%s is not a local Mercurial repo') % path) | |||
36 | self.created.append(path) |
|
40 | self.created.append(path) | |
37 | except hg.RepoError, err: |
|
41 | except hg.RepoError, err: | |
38 | ui.print_exc() |
|
42 | ui.print_exc() |
General Comments 0
You need to be logged in to leave comments.
Login now