Show More
@@ -73,12 +73,22 b' class bzr_source(converter_source):' | |||||
73 | def getfile(self, name, rev): |
|
73 | def getfile(self, name, rev): | |
74 | revtree = self.sourcerepo.revision_tree(rev) |
|
74 | revtree = self.sourcerepo.revision_tree(rev) | |
75 | fileid = revtree.path2id(name) |
|
75 | fileid = revtree.path2id(name) | |
76 | if fileid is None or revtree.kind(fileid) not in supportedkinds: |
|
76 | kind = None | |
|
77 | if fileid is not None: | |||
|
78 | kind = revtree.kind(fileid) | |||
|
79 | if kind not in supportedkinds: | |||
77 | # the file is not available anymore - was deleted |
|
80 | # the file is not available anymore - was deleted | |
78 | raise IOError(_('%s is not available in %s anymore') % |
|
81 | raise IOError(_('%s is not available in %s anymore') % | |
79 | (name, rev)) |
|
82 | (name, rev)) | |
80 | sio = revtree.get_file(fileid) |
|
83 | if kind == 'symlink': | |
81 | return sio.read() |
|
84 | target = revtree.get_symlink_target(fileid) | |
|
85 | if target is None: | |||
|
86 | raise util.Abort(_('%s.%s symlink has no target') | |||
|
87 | % (name, rev)) | |||
|
88 | return target | |||
|
89 | else: | |||
|
90 | sio = revtree.get_file(fileid) | |||
|
91 | return sio.read() | |||
82 |
|
92 | |||
83 | def getmode(self, name, rev): |
|
93 | def getmode(self, name, rev): | |
84 | return self._modecache[(name, rev)] |
|
94 | return self._modecache[(name, rev)] |
General Comments 0
You need to be logged in to leave comments.
Login now