Show More
@@ -37,13 +37,14 b' class bzr_source(converter_source):' | |||||
37 | super(bzr_source, self).__init__(ui, path, rev=rev) |
|
37 | super(bzr_source, self).__init__(ui, path, rev=rev) | |
38 |
|
38 | |||
39 | if not os.path.exists(os.path.join(path, '.bzr')): |
|
39 | if not os.path.exists(os.path.join(path, '.bzr')): | |
40 |
raise NoRepo('%s does not look like a Bazaar repository' |
|
40 | raise NoRepo(_('%s does not look like a Bazaar repository') | |
|
41 | % path) | |||
41 |
|
42 | |||
42 | try: |
|
43 | try: | |
43 | # access bzrlib stuff |
|
44 | # access bzrlib stuff | |
44 | branch |
|
45 | branch | |
45 | except NameError: |
|
46 | except NameError: | |
46 | raise NoRepo('Bazaar modules could not be loaded') |
|
47 | raise NoRepo(_('Bazaar modules could not be loaded')) | |
47 |
|
48 | |||
48 | path = os.path.abspath(path) |
|
49 | path = os.path.abspath(path) | |
49 | self._checkrepotype(path) |
|
50 | self._checkrepotype(path) |
@@ -19,7 +19,7 b' class convert_cvs(converter_source):' | |||||
19 |
|
19 | |||
20 | cvs = os.path.join(path, "CVS") |
|
20 | cvs = os.path.join(path, "CVS") | |
21 | if not os.path.exists(cvs): |
|
21 | if not os.path.exists(cvs): | |
22 | raise NoRepo("%s does not look like a CVS checkout" % path) |
|
22 | raise NoRepo(_("%s does not look like a CVS checkout") % path) | |
23 |
|
23 | |||
24 | checktool('cvs') |
|
24 | checktool('cvs') | |
25 |
|
25 |
@@ -129,7 +129,7 b' def createlog(ui, directory=None, root="' | |||||
129 | if prefix == ".": |
|
129 | if prefix == ".": | |
130 | prefix = "" |
|
130 | prefix = "" | |
131 | except IOError: |
|
131 | except IOError: | |
132 |
raise logerror(' |
|
132 | raise logerror(_('not a CVS sandbox')) | |
133 |
|
133 | |||
134 | if prefix and not prefix.endswith(os.sep): |
|
134 | if prefix and not prefix.endswith(os.sep): | |
135 | prefix += os.sep |
|
135 | prefix += os.sep | |
@@ -435,8 +435,8 b' def createlog(ui, directory=None, root="' | |||||
435 | log.sort(key=lambda x: x.date) |
|
435 | log.sort(key=lambda x: x.date) | |
436 |
|
436 | |||
437 | if oldlog and oldlog[-1].date >= log[0].date: |
|
437 | if oldlog and oldlog[-1].date >= log[0].date: | |
438 |
raise logerror(' |
|
438 | raise logerror(_('log cache overlaps with new log entries,' | |
439 | ' re-run without cache.') |
|
439 | ' re-run without cache.')) | |
440 |
|
440 | |||
441 | log = oldlog + log |
|
441 | log = oldlog + log | |
442 |
|
442 |
@@ -34,10 +34,10 b' class darcs_source(converter_source, com' | |||||
34 | # check for _darcs, ElementTree, _darcs/inventory so that we can |
|
34 | # check for _darcs, ElementTree, _darcs/inventory so that we can | |
35 | # easily skip test-convert-darcs if ElementTree is not around |
|
35 | # easily skip test-convert-darcs if ElementTree is not around | |
36 | if not os.path.exists(os.path.join(path, '_darcs', 'inventories')): |
|
36 | if not os.path.exists(os.path.join(path, '_darcs', 'inventories')): | |
37 | raise NoRepo("%s does not look like a darcs repository" % path) |
|
37 | raise NoRepo(_("%s does not look like a darcs repository") % path) | |
38 |
|
38 | |||
39 | if not os.path.exists(os.path.join(path, '_darcs')): |
|
39 | if not os.path.exists(os.path.join(path, '_darcs')): | |
40 | raise NoRepo("%s does not look like a darcs repository" % path) |
|
40 | raise NoRepo(_("%s does not look like a darcs repository") % path) | |
41 |
|
41 | |||
42 | checktool('darcs') |
|
42 | checktool('darcs') | |
43 | version = self.run0('--version').splitlines()[0].strip() |
|
43 | version = self.run0('--version').splitlines()[0].strip() |
@@ -7,6 +7,7 b'' | |||||
7 |
|
7 | |||
8 | import os |
|
8 | import os | |
9 | from mercurial import util |
|
9 | from mercurial import util | |
|
10 | from mercurial.i18n import _ | |||
10 |
|
11 | |||
11 | from common import NoRepo, commit, converter_source, checktool |
|
12 | from common import NoRepo, commit, converter_source, checktool | |
12 |
|
13 | |||
@@ -35,7 +36,7 b' class convert_git(converter_source):' | |||||
35 | if os.path.isdir(path + "/.git"): |
|
36 | if os.path.isdir(path + "/.git"): | |
36 | path += "/.git" |
|
37 | path += "/.git" | |
37 | if not os.path.exists(path + "/objects"): |
|
38 | if not os.path.exists(path + "/objects"): | |
38 | raise NoRepo("%s does not look like a Git repository" % path) |
|
39 | raise NoRepo(_("%s does not look like a Git repository") % path) | |
39 |
|
40 | |||
40 | checktool('git', 'git') |
|
41 | checktool('git', 'git') | |
41 |
|
42 |
@@ -51,7 +51,7 b' class mercurial_sink(converter_sink):' | |||||
51 | self.created.append(path) |
|
51 | self.created.append(path) | |
52 | except error.RepoError: |
|
52 | except error.RepoError: | |
53 | ui.traceback() |
|
53 | ui.traceback() | |
54 | raise NoRepo("could not create hg repository %s as sink" |
|
54 | raise NoRepo(_("could not create hg repository %s as sink") | |
55 | % path) |
|
55 | % path) | |
56 | self.lock = None |
|
56 | self.lock = None | |
57 | self.wlock = None |
|
57 | self.wlock = None | |
@@ -227,7 +227,7 b' class mercurial_source(converter_source)' | |||||
227 | raise error.RepoError() |
|
227 | raise error.RepoError() | |
228 | except error.RepoError: |
|
228 | except error.RepoError: | |
229 | ui.traceback() |
|
229 | ui.traceback() | |
230 | raise NoRepo("%s is not a local Mercurial repository" % path) |
|
230 | raise NoRepo(_("%s is not a local Mercurial repository") % path) | |
231 | self.lastrev = None |
|
231 | self.lastrev = None | |
232 | self.lastctx = None |
|
232 | self.lastctx = None | |
233 | self._changescache = None |
|
233 | self._changescache = None |
@@ -28,7 +28,7 b' class p4_source(converter_source):' | |||||
28 | super(p4_source, self).__init__(ui, path, rev=rev) |
|
28 | super(p4_source, self).__init__(ui, path, rev=rev) | |
29 |
|
29 | |||
30 | if "/" in path and not path.startswith('//'): |
|
30 | if "/" in path and not path.startswith('//'): | |
31 | raise NoRepo('%s does not look like a P4 repository' % path) |
|
31 | raise NoRepo(_('%s does not look like a P4 repository') % path) | |
32 |
|
32 | |||
33 | checktool('p4', abort=False) |
|
33 | checktool('p4', abort=False) | |
34 |
|
34 |
@@ -207,7 +207,8 b' class svn_source(converter_source):' | |||||
207 | (os.path.exists(url) and |
|
207 | (os.path.exists(url) and | |
208 | os.path.exists(os.path.join(url, '.svn'))) or |
|
208 | os.path.exists(os.path.join(url, '.svn'))) or | |
209 | issvnurl(ui, url)): |
|
209 | issvnurl(ui, url)): | |
210 |
raise NoRepo("%s does not look like a Subversion repository" |
|
210 | raise NoRepo(_("%s does not look like a Subversion repository") | |
|
211 | % url) | |||
211 |
|
212 | |||
212 | try: |
|
213 | try: | |
213 | SubversionException |
|
214 | SubversionException | |
@@ -252,7 +253,7 b' class svn_source(converter_source):' | |||||
252 | self.uuid = svn.ra.get_uuid(self.ra) |
|
253 | self.uuid = svn.ra.get_uuid(self.ra) | |
253 | except SubversionException: |
|
254 | except SubversionException: | |
254 | ui.traceback() |
|
255 | ui.traceback() | |
255 | raise NoRepo("%s does not look like a Subversion repository" |
|
256 | raise NoRepo(_("%s does not look like a Subversion repository") | |
256 | % self.url) |
|
257 | % self.url) | |
257 |
|
258 | |||
258 | if rev: |
|
259 | if rev: |
General Comments 0
You need to be logged in to leave comments.
Login now