Show More
@@ -768,7 +768,7 b' def check_git_version():' | |||
|
768 | 768 | if 'git' in BACKENDS: |
|
769 | 769 | log.debug('GIT version detected: %s' % stdout) |
|
770 | 770 | if stderr: |
|
771 | log.warning('Unable to detect git version org error was:%r' % stderr) | |
|
771 | log.warning('Unable to detect git version, org error was: %r' % stderr) | |
|
772 | 772 | elif to_old_git: |
|
773 | 773 | log.warning('RhodeCode detected git version %s, which is too old ' |
|
774 | 774 | 'for the system to function properly. Make sure ' |
@@ -153,7 +153,7 b' class GitChangeset(BaseChangeset):' | |||
|
153 | 153 | self._stat_modes[name] = stat |
|
154 | 154 | if not path in self._paths: |
|
155 | 155 | raise NodeDoesNotExistError("There is no file nor directory " |
|
156 |
"at the given path |
|
|
156 | "at the given path '%s' at revision %s" | |
|
157 | 157 | % (path, self.short_id)) |
|
158 | 158 | return self._paths[path] |
|
159 | 159 | |
@@ -167,8 +167,8 b' class GitChangeset(BaseChangeset):' | |||
|
167 | 167 | def _get_filectx(self, path): |
|
168 | 168 | path = self._fix_path(path) |
|
169 | 169 | if self._get_kind(path) != NodeKind.FILE: |
|
170 |
raise ChangesetError("File does not exist for revision % |
|
|
171 |
" |
|
|
170 | raise ChangesetError("File does not exist for revision %s at " | |
|
171 | " '%s'" % (self.raw_id, path)) | |
|
172 | 172 | return path |
|
173 | 173 | |
|
174 | 174 | def _get_file_nodes(self): |
@@ -394,8 +394,8 b' class GitChangeset(BaseChangeset):' | |||
|
394 | 394 | |
|
395 | 395 | def get_nodes(self, path): |
|
396 | 396 | if self._get_kind(path) != NodeKind.DIR: |
|
397 |
raise ChangesetError("Directory does not exist for revision % |
|
|
398 |
" |
|
|
397 | raise ChangesetError("Directory does not exist for revision %s at " | |
|
398 | " '%s'" % (self.revision, path)) | |
|
399 | 399 | path = self._fix_path(path) |
|
400 | 400 | id = self._get_id_for_path(path) |
|
401 | 401 | tree = self.repository._repo[id] |
@@ -458,7 +458,7 b' class GitChangeset(BaseChangeset):' | |||
|
458 | 458 | node._blob = obj |
|
459 | 459 | else: |
|
460 | 460 | raise NodeDoesNotExistError("There is no file nor directory " |
|
461 |
"at the given path |
|
|
461 | "at the given path '%s' at revision %s" | |
|
462 | 462 | % (path, self.short_id)) |
|
463 | 463 | # cache node |
|
464 | 464 | self.nodes[path] = node |
@@ -267,7 +267,7 b' class GitRepository(BaseRepository):' | |||
|
267 | 267 | try: |
|
268 | 268 | revision = self.revisions[int(revision)] |
|
269 | 269 | except: |
|
270 |
raise ChangesetDoesNotExistError("Revision % |
|
|
270 | raise ChangesetDoesNotExistError("Revision %s does not exist " | |
|
271 | 271 | "for this repository" % (revision)) |
|
272 | 272 | |
|
273 | 273 | elif is_bstr(revision): |
@@ -282,12 +282,12 b' class GitRepository(BaseRepository):' | |||
|
282 | 282 | return _tags_shas[_tags_shas.index(revision)] |
|
283 | 283 | |
|
284 | 284 | elif not pattern.match(revision) or revision not in self.revisions: |
|
285 |
raise ChangesetDoesNotExistError("Revision % |
|
|
285 | raise ChangesetDoesNotExistError("Revision %s does not exist " | |
|
286 | 286 | "for this repository" % (revision)) |
|
287 | 287 | |
|
288 | 288 | # Ensure we return full id |
|
289 | 289 | if not pattern.match(str(revision)): |
|
290 |
raise ChangesetDoesNotExistError("Given revision % |
|
|
290 | raise ChangesetDoesNotExistError("Given revision %s not recognized" | |
|
291 | 291 | % revision) |
|
292 | 292 | return revision |
|
293 | 293 |
@@ -174,14 +174,14 b' class MercurialChangeset(BaseChangeset):' | |||
|
174 | 174 | elif path in self._dir_paths: |
|
175 | 175 | return NodeKind.DIR |
|
176 | 176 | else: |
|
177 |
raise ChangesetError("Node does not exist at the given path |
|
|
177 | raise ChangesetError("Node does not exist at the given path '%s'" | |
|
178 | 178 | % (path)) |
|
179 | 179 | |
|
180 | 180 | def _get_filectx(self, path): |
|
181 | 181 | path = self._fix_path(path) |
|
182 | 182 | if self._get_kind(path) != NodeKind.FILE: |
|
183 |
raise ChangesetError("File does not exist for revision % |
|
|
184 |
" |
|
|
183 | raise ChangesetError("File does not exist for revision %s at " | |
|
184 | " '%s'" % (self.raw_id, path)) | |
|
185 | 185 | return self._ctx.filectx(path) |
|
186 | 186 | |
|
187 | 187 | def _extract_submodules(self): |
@@ -300,8 +300,8 b' class MercurialChangeset(BaseChangeset):' | |||
|
300 | 300 | """ |
|
301 | 301 | |
|
302 | 302 | if self._get_kind(path) != NodeKind.DIR: |
|
303 |
raise ChangesetError("Directory does not exist for revision % |
|
|
304 |
" |
|
|
303 | raise ChangesetError("Directory does not exist for revision %s at " | |
|
304 | " '%s'" % (self.revision, path)) | |
|
305 | 305 | path = self._fix_path(path) |
|
306 | 306 | |
|
307 | 307 | filenodes = [FileNode(f, changeset=self) for f in self._file_paths |
@@ -344,7 +344,7 b' class MercurialChangeset(BaseChangeset):' | |||
|
344 | 344 | node = DirNode(path, changeset=self) |
|
345 | 345 | else: |
|
346 | 346 | raise NodeDoesNotExistError("There is no file nor directory " |
|
347 |
"at the given path: |
|
|
347 | "at the given path: '%s' at revision %s" | |
|
348 | 348 | % (path, self.short_id)) |
|
349 | 349 | # cache node |
|
350 | 350 | self.nodes[path] = node |
@@ -404,7 +404,7 b' class MercurialRepository(BaseRepository' | |||
|
404 | 404 | try: |
|
405 | 405 | revision = hex(self._repo.lookup(revision)) |
|
406 | 406 | except (IndexError, ValueError, RepoLookupError, TypeError): |
|
407 |
raise ChangesetDoesNotExistError("Revision % |
|
|
407 | raise ChangesetDoesNotExistError("Revision %s does not " | |
|
408 | 408 | "exist for this repository" |
|
409 | 409 | % (revision)) |
|
410 | 410 | return revision |
@@ -291,7 +291,7 b' removed extra unicode conversion in diff' | |||
|
291 | 291 | revision=rev, |
|
292 | 292 | f_path=f_path)) |
|
293 | 293 | |
|
294 |
msg = """Revision % |
|
|
294 | msg = """Revision %s does not exist for this repository""" % (rev) | |
|
295 | 295 | self.checkSessionFlash(response, msg) |
|
296 | 296 | |
|
297 | 297 | self.assertEqual('http://localhost/%s/files/tip/' % HG_REPO, response.headers['location']) |
@@ -305,7 +305,7 b' removed extra unicode conversion in diff' | |||
|
305 | 305 | revision=rev, |
|
306 | 306 | f_path=f_path)) |
|
307 | 307 | |
|
308 |
msg = "There is no file nor directory at the given path: |
|
|
308 | msg = "There is no file nor directory at the given path: '%s' at revision %s" % (f_path, rev[:12]) | |
|
309 | 309 | self.checkSessionFlash(response, msg) |
|
310 | 310 | |
|
311 | 311 | #========================================================================== |
@@ -329,7 +329,7 b' removed extra unicode conversion in diff' | |||
|
329 | 329 | repo_name=HG_REPO, |
|
330 | 330 | revision=rev, |
|
331 | 331 | f_path=f_path)) |
|
332 |
msg = """Revision % |
|
|
332 | msg = """Revision %s does not exist for this repository""" % (rev) | |
|
333 | 333 | self.checkSessionFlash(response, msg) |
|
334 | 334 | |
|
335 | 335 | self.assertEqual('http://localhost/%s/files/tip/' % HG_REPO, response.headers['location']) |
@@ -342,7 +342,7 b' removed extra unicode conversion in diff' | |||
|
342 | 342 | repo_name=HG_REPO, |
|
343 | 343 | revision=rev, |
|
344 | 344 | f_path=f_path)) |
|
345 |
msg = "There is no file nor directory at the given path: |
|
|
345 | msg = "There is no file nor directory at the given path: '%s' at revision %s" % (f_path, rev[:12]) | |
|
346 | 346 | self.checkSessionFlash(response, msg) |
|
347 | 347 | |
|
348 | 348 | def test_ajaxed_files_list(self): |
General Comments 0
You need to be logged in to leave comments.
Login now