equal
deleted
inserted
replaced
35 |
35 |
36 def __init__(self, ui, path, rev=None): |
36 def __init__(self, ui, path, rev=None): |
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' % path) |
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) |
50 self.branch = branch.Branch.open(path) |
51 self.branch = branch.Branch.open(path) |
51 self.sourcerepo = self.branch.repository |
52 self.sourcerepo = self.branch.repository |