comparison mercurial/context.py @ 23561:3c2419e07df5

namespaces: remove weakref; always pass in repo It turns out that maintaining a reference of any sort (even weak!) to the repo when constructed doesn't work because we may at some point pass in a repoview filtered by something other than what the initial repo was.
author Ryan McElroy <rmcelroy@fb.com>
date Sun, 14 Dec 2014 19:11:44 -0800
parents aead63705504
children 59e703aecaf6
comparison
equal deleted inserted replaced
23560:aead63705504 23561:3c2419e07df5
407 except (TypeError, LookupError): 407 except (TypeError, LookupError):
408 pass 408 pass
409 409
410 # lookup bookmarks through the name interface 410 # lookup bookmarks through the name interface
411 try: 411 try:
412 self._node = repo.names.singlenode(changeid) 412 self._node = repo.names.singlenode(repo, changeid)
413 self._rev = repo.changelog.rev(self._node) 413 self._rev = repo.changelog.rev(self._node)
414 return 414 return
415 except KeyError: 415 except KeyError:
416 pass 416 pass
417 417