troter

[tui] set attribute '_walker' to RepoViewer

Jun 12th, 2012
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # HG changeset patch
  2. # User Takumi IINO <trot.thunder@gmail.com>
  3. # Date 1339508723 -32400
  4. # Node ID a537fbaebb9fc70658ae959ce9ae8f6dc04aeafa
  5. # Parent  b3480d01ad48230487bcaa6a0c00afb1cf5ecdd8
  6. [tui] set attribute '_walker' to RepoViewer
  7.  
  8. Press 'r', get a stack trace.
  9.  
  10. Traceback (most recent call last):
  11.   File "/usr/bin/hgview", line 33, in <module>
  12.     main()
  13.   File "/usr/lib/python2.6/site-packages/hgviewlib/application.py", line 192, in main
  14.     sys.exit(start(repo, opts, args, parser.error))
  15.   File "/usr/lib/python2.6/site-packages/hgviewlib/application.py", line 143, in start
  16.     return app.exec_()
  17.   File "/usr/lib/python2.6/site-packages/hgviewlib/curses/application.py", line 87, in exec_
  18.     out = self.mainloop.run()
  19.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 274, in run
  20.     self.screen.run_wrapper(self._run)
  21.   File "/usr/lib/python2.6/site-packages/urwid/raw_display.py", line 237, in run_wrapper
  22.     return fn()
  23.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 307, in _run
  24.     self.event_loop.run()
  25.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 682, in run
  26.     self._loop()
  27.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 720, in _loop
  28.     self._watch_files[fd]()
  29.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 358, in _update
  30.     self.process_input(keys)
  31.   File "/usr/lib/python2.6/site-packages/urwid/main_loop.py", line 447, in process_input
  32.     k = self._topmost_widget.keypress(self.screen_size, k)
  33.   File "/usr/lib/python2.6/site-packages/hgviewlib/curses/mainframe.py", line 152, in keypress
  34.     emit_command(hg_command_map[key][1:])
  35.   File "/usr/lib/python2.6/site-packages/hgviewlib/curses/utils.py", line 184, in emit
  36.     result |= bool(data.func(*ags, **kws))
  37.   File "/usr/lib/python2.6/site-packages/hgviewlib/curses/hgrepoviewer.py", line 331, in refresh
  38.     self._walker.setRepo()
  39. AttributeError: 'RepoViewer' object has no attribute '_walker'
  40.  
  41. diff --git a/hgviewlib/curses/hgrepoviewer.py b/hgviewlib/curses/hgrepoviewer.py
  42. --- a/hgviewlib/curses/hgrepoviewer.py
  43. +++ b/hgviewlib/curses/hgrepoviewer.py
  44. @@ -290,9 +290,9 @@
  45.          self._show_context = 0 # O:hide, 1:half, 2:maximized
  46.          self.refreshing = False # flag to now if the repo is refreshing
  47.  
  48. -        walker = HgRepoListWalker(repo)
  49. -        self.graphlog = GraphlogViewer(walker=walker)
  50. -        self.context = ContextViewer(walker=walker)
  51. +        self._walker = HgRepoListWalker(repo)
  52. +        self.graphlog = GraphlogViewer(walker=self._walker)
  53. +        self.context = ContextViewer(walker=self._walker)
  54.  
  55.          widget_list = [('weight', 1 - self.CONTEXT_SIZE, self.graphlog),]
RAW Paste Data