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