Show More
@@ -32,12 +32,16 b' sink_converters = [' | |||
|
32 | 32 | ] |
|
33 | 33 | |
|
34 | 34 | def convertsource(ui, path, type, rev): |
|
35 | exceptions = [] | |
|
35 | 36 | for name, source in source_converters: |
|
36 | 37 | try: |
|
37 | 38 | if not type or name == type: |
|
38 | 39 | return source(ui, path, rev) |
|
39 | 40 | except NoRepo, inst: |
|
40 | ui.note(_("convert: %s\n") % inst) | |
|
41 | exceptions.append(inst) | |
|
42 | if not ui.quiet: | |
|
43 | for inst in exceptions: | |
|
44 | ui.write(_("%s\n") % inst) | |
|
41 | 45 | raise util.Abort('%s: unknown repository type' % path) |
|
42 | 46 | |
|
43 | 47 | def convertsink(ui, path, type): |
@@ -11,7 +11,7 b' class convert_cvs(converter_source):' | |||
|
11 | 11 | |
|
12 | 12 | cvs = os.path.join(path, "CVS") |
|
13 | 13 | if not os.path.exists(cvs): |
|
14 |
raise NoRepo(" |
|
|
14 | raise NoRepo("%s does not look like a CVS checkout" % path) | |
|
15 | 15 | |
|
16 | 16 | self.changeset = {} |
|
17 | 17 | self.files = {} |
@@ -24,13 +24,13 b' class darcs_source(converter_source):' | |||
|
24 | 24 | # check for _darcs, ElementTree, _darcs/inventory so that we can |
|
25 | 25 | # easily skip test-convert-darcs if ElementTree is not around |
|
26 | 26 | if not os.path.exists(os.path.join(path, '_darcs')): |
|
27 |
raise NoRepo(" |
|
|
27 | raise NoRepo("%s does not look like a darcs repo" % path) | |
|
28 | 28 | |
|
29 | 29 | if ElementTree is None: |
|
30 | 30 | raise util.Abort(_("Python ElementTree module is not available")) |
|
31 | 31 | |
|
32 | 32 | if not os.path.exists(os.path.join(path, '_darcs', 'inventory')): |
|
33 |
raise NoRepo(" |
|
|
33 | raise NoRepo("%s does not look like a darcs repo" % path) | |
|
34 | 34 | |
|
35 | 35 | self.path = os.path.realpath(path) |
|
36 | 36 |
@@ -30,7 +30,7 b' class convert_git(converter_source):' | |||
|
30 | 30 | if os.path.isdir(path + "/.git"): |
|
31 | 31 | path += "/.git" |
|
32 | 32 | if not os.path.exists(path + "/objects"): |
|
33 |
raise NoRepo(" |
|
|
33 | raise NoRepo("%s does not look like a Git repo" % path) | |
|
34 | 34 | self.path = path |
|
35 | 35 | |
|
36 | 36 | def getheads(self): |
@@ -190,7 +190,7 b' class mercurial_source(converter_source)' | |||
|
190 | 190 | self.repo.heads() |
|
191 | 191 | except hg.RepoError: |
|
192 | 192 | ui.print_exc() |
|
193 |
raise NoRepo(" |
|
|
193 | raise NoRepo("%s does not look like a Mercurial repo" % path) | |
|
194 | 194 | self.lastrev = None |
|
195 | 195 | self.lastctx = None |
|
196 | 196 | self._changescache = None |
@@ -102,7 +102,7 b' class svn_source(converter_source):' | |||
|
102 | 102 | try: |
|
103 | 103 | SubversionException |
|
104 | 104 | except NameError: |
|
105 |
raise NoRepo(' |
|
|
105 | raise NoRepo('Subversion python bindings could not be loaded') | |
|
106 | 106 | |
|
107 | 107 | self.encoding = locale.getpreferredencoding() |
|
108 | 108 | self.lastrevs = {} |
@@ -131,7 +131,7 b' class svn_source(converter_source):' | |||
|
131 | 131 | self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) |
|
132 | 132 | except SubversionException, e: |
|
133 | 133 | ui.print_exc() |
|
134 |
raise NoRepo(" |
|
|
134 | raise NoRepo("%s does not look like a Subversion repo" % self.url) | |
|
135 | 135 | |
|
136 | 136 | if rev: |
|
137 | 137 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now