Show More
@@ -328,17 +328,18 b' class localrepository(repo.repository):' | |||
|
328 | 328 | f.write("%s %s\n" % (hex(node), label)) |
|
329 | 329 | |
|
330 | 330 | def lookup(self, key): |
|
331 | try: | |
|
331 | if key == '.': | |
|
332 | key = self.dirstate.parents()[0] | |
|
333 | if key == nullid: | |
|
334 | raise repo.RepoError(_("no revision checked out")) | |
|
335 | if key in self.tags(): | |
|
332 | 336 | return self.tags()[key] |
|
333 | except KeyError: | |
|
334 | if key == '.': | |
|
335 | key = self.dirstate.parents()[0] | |
|
336 | if key == nullid: | |
|
337 | raise repo.RepoError(_("no revision checked out")) | |
|
338 | try: | |
|
339 | return self.changelog.lookup(key) | |
|
340 | except: | |
|
341 | raise repo.RepoError(_("unknown revision '%s'") % key) | |
|
337 | if key in self.branchtags(): | |
|
338 | return self.branchtags()[key] | |
|
339 | try: | |
|
340 | return self.changelog.lookup(key) | |
|
341 | except: | |
|
342 | raise repo.RepoError(_("unknown revision '%s'") % key) | |
|
342 | 343 | |
|
343 | 344 | def dev(self): |
|
344 | 345 | return os.lstat(self.path).st_dev |
General Comments 0
You need to be logged in to leave comments.
Login now