##// END OF EJS Templates
convert: write "repository" instead of "repo"...
Martin Geisler -
r10938:02d6149a stable
parent child Browse files
Show More
@@ -37,7 +37,7 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 repo' % path)
40 raise NoRepo('%s does not look like a Bazaar repository' % path)
41
41
42 try:
42 try:
43 # access bzrlib stuff
43 # access bzrlib stuff
@@ -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 repo" % 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 repo" % 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()
@@ -35,7 +35,7 b' class convert_git(converter_source):'
35 if os.path.isdir(path + "/.git"):
35 if os.path.isdir(path + "/.git"):
36 path += "/.git"
36 path += "/.git"
37 if not os.path.exists(path + "/objects"):
37 if not os.path.exists(path + "/objects"):
38 raise NoRepo("%s does not look like a Git repo" % path)
38 raise NoRepo("%s does not look like a Git repository" % path)
39
39
40 checktool('git', 'git')
40 checktool('git', 'git')
41
41
@@ -31,7 +31,8 b' class gnuarch_source(converter_source, c'
31 super(gnuarch_source, self).__init__(ui, path, rev=rev)
31 super(gnuarch_source, self).__init__(ui, path, rev=rev)
32
32
33 if not os.path.exists(os.path.join(path, '{arch}')):
33 if not os.path.exists(os.path.join(path, '{arch}')):
34 raise NoRepo(_("%s does not look like a GNU Arch repo") % path)
34 raise NoRepo(_("%s does not look like a GNU Arch repository")
35 % path)
35
36
36 # Could use checktool, but we want to check for baz or tla.
37 # Could use checktool, but we want to check for baz or tla.
37 self.execmd = None
38 self.execmd = None
@@ -36,7 +36,8 b' class mercurial_sink(converter_sink):'
36 try:
36 try:
37 self.repo = hg.repository(self.ui, path)
37 self.repo = hg.repository(self.ui, path)
38 if not self.repo.local():
38 if not self.repo.local():
39 raise NoRepo(_('%s is not a local Mercurial repo') % path)
39 raise NoRepo(_('%s is not a local Mercurial repository')
40 % path)
40 except error.RepoError, err:
41 except error.RepoError, err:
41 ui.traceback()
42 ui.traceback()
42 raise NoRepo(err.args[0])
43 raise NoRepo(err.args[0])
@@ -45,11 +46,13 b' class mercurial_sink(converter_sink):'
45 ui.status(_('initializing destination %s repository\n') % path)
46 ui.status(_('initializing destination %s repository\n') % path)
46 self.repo = hg.repository(self.ui, path, create=True)
47 self.repo = hg.repository(self.ui, path, create=True)
47 if not self.repo.local():
48 if not self.repo.local():
48 raise NoRepo(_('%s is not a local Mercurial repo') % path)
49 raise NoRepo(_('%s is not a local Mercurial repository')
50 % path)
49 self.created.append(path)
51 self.created.append(path)
50 except error.RepoError:
52 except error.RepoError:
51 ui.traceback()
53 ui.traceback()
52 raise NoRepo("could not create hg repo %s as sink" % path)
54 raise NoRepo("could not create hg repository %s as sink"
55 % path)
53 self.lock = None
56 self.lock = None
54 self.wlock = None
57 self.wlock = None
55 self.filemapmode = False
58 self.filemapmode = False
@@ -224,7 +227,7 b' class mercurial_source(converter_source)'
224 raise error.RepoError()
227 raise error.RepoError()
225 except error.RepoError:
228 except error.RepoError:
226 ui.traceback()
229 ui.traceback()
227 raise NoRepo("%s is not a local Mercurial repo" % path)
230 raise NoRepo("%s is not a local Mercurial repository" % path)
228 self.lastrev = None
231 self.lastrev = None
229 self.lastctx = None
232 self.lastctx = None
230 self._changescache = None
233 self._changescache = None
@@ -20,7 +20,8 b' class monotone_source(converter_source, '
20 self.ui = ui
20 self.ui = ui
21 self.path = path
21 self.path = path
22
22
23 norepo = NoRepo (_("%s does not look like a monotone repo") % path)
23 norepo = NoRepo(_("%s does not look like a monotone repository")
24 % path)
24 if not os.path.exists(os.path.join(path, '_MTN')):
25 if not os.path.exists(os.path.join(path, '_MTN')):
25 # Could be a monotone repository (SQLite db file)
26 # Could be a monotone repository (SQLite db file)
26 try:
27 try:
@@ -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 repo' % 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,7 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 repo" % url)
210 raise NoRepo("%s does not look like a Subversion repository" % url)
211
211
212 try:
212 try:
213 SubversionException
213 SubversionException
@@ -252,7 +252,8 b' class svn_source(converter_source):'
252 self.uuid = svn.ra.get_uuid(self.ra)
252 self.uuid = svn.ra.get_uuid(self.ra)
253 except SubversionException:
253 except SubversionException:
254 ui.traceback()
254 ui.traceback()
255 raise NoRepo("%s does not look like a Subversion repo" % self.url)
255 raise NoRepo("%s does not look like a Subversion repository"
256 % self.url)
256
257
257 if rev:
258 if rev:
258 try:
259 try:
@@ -984,7 +985,7 b' class svn_sink(converter_sink, commandli'
984
985
985 if os.path.isdir(os.path.dirname(path)):
986 if os.path.isdir(os.path.dirname(path)):
986 if not os.path.exists(os.path.join(path, 'db', 'fs-type')):
987 if not os.path.exists(os.path.join(path, 'db', 'fs-type')):
987 ui.status(_('initializing svn repo %r\n') %
988 ui.status(_('initializing svn repository %r\n') %
988 os.path.basename(path))
989 os.path.basename(path))
989 commandline(ui, 'svnadmin').run0('create', path)
990 commandline(ui, 'svnadmin').run0('create', path)
990 created = path
991 created = path
@@ -4,7 +4,7 b' adding d1/d2/b'
4 % modify
4 % modify
5 1:e0e2b8a9156b
5 1:e0e2b8a9156b
6 assuming destination a-hg
6 assuming destination a-hg
7 initializing svn repo 'a-hg'
7 initializing svn repository 'a-hg'
8 initializing svn wc 'a-hg-wc'
8 initializing svn wc 'a-hg-wc'
9 scanning source...
9 scanning source...
10 sorting...
10 sorting...
@@ -196,7 +196,7 b' executable'
196 % executable in new directory
196 % executable in new directory
197 adding d1/a
197 adding d1/a
198 assuming destination a-hg
198 assuming destination a-hg
199 initializing svn repo 'a-hg'
199 initializing svn repository 'a-hg'
200 initializing svn wc 'a-hg-wc'
200 initializing svn wc 'a-hg-wc'
201 scanning source...
201 scanning source...
202 sorting...
202 sorting...
@@ -267,7 +267,7 b' merging b failed!'
267 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
267 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
268 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
268 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
269 assuming destination b-hg
269 assuming destination b-hg
270 initializing svn repo 'b-hg'
270 initializing svn repository 'b-hg'
271 initializing svn wc 'b-hg-wc'
271 initializing svn wc 'b-hg-wc'
272 scanning source...
272 scanning source...
273 sorting...
273 sorting...
@@ -259,13 +259,13 b' run hg source post-conversion action'
259 assuming destination emptydir-hg
259 assuming destination emptydir-hg
260 initializing destination emptydir-hg repository
260 initializing destination emptydir-hg repository
261 emptydir does not look like a CVS checkout
261 emptydir does not look like a CVS checkout
262 emptydir does not look like a Git repo
262 emptydir does not look like a Git repository
263 emptydir does not look like a Subversion repo
263 emptydir does not look like a Subversion repository
264 emptydir is not a local Mercurial repo
264 emptydir is not a local Mercurial repository
265 emptydir does not look like a darcs repo
265 emptydir does not look like a darcs repository
266 emptydir does not look like a monotone repo
266 emptydir does not look like a monotone repository
267 emptydir does not look like a GNU Arch repo
267 emptydir does not look like a GNU Arch repository
268 emptydir does not look like a Bazaar repo
268 emptydir does not look like a Bazaar repository
269 cannot find required "p4" tool
269 cannot find required "p4" tool
270 abort: emptydir: missing or unsupported repository
270 abort: emptydir: missing or unsupported repository
271 % convert with imaginary source type
271 % convert with imaginary source type
General Comments 0
You need to be logged in to leave comments. Login now