call site 0 for path.local.__hash__
apigen/testing/test_apigen_example.py - line 296
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
   def test_build_function_navigation(self):
       self.apb.build_namespace_pages()
->     self.apb.build_function_pages(['main.sub.func'])
       self.apb.build_class_pages(['main.SomeClass',
                                   'main.SomeSubClass',
                                   'main.SomeInstance',
                                   'main.SomeHiddenClass'])
       self.linker.replace_dirpath(self.base, False)
       html = self.base.join('api/main.sub.func.html').read()
       print html
       # XXX NOTE: do not mess with the string below, the spaces between the
       # <div> and <a> are actually UTF-8 \xa0 characters (non-breaking
       # spaces)!
       assert """\
       <div class="sidebar">
         <div class="selected"><a href="index.html">pkg</a></div>
         <div class="selected">  <a href="main.html">main</a></div>
         <div>    <a href="main.SomeClass.html">SomeClass</a></div>
         <div>    <a href="main.SomeInstance.html">SomeInstance</a></div>
         <div>    <a href="main.SomeSubClass.html">SomeSubClass</a></div>
         <div class="selected">    <a href="main.sub.html">sub</a></div>
         <div class="selected">      <a href="main.sub.func.html">func</a></div>
         <div>  <a href="other.html">other</a></div></div>
   """ in html
apigen/htmlgen.py - line 534
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
   def build_function_pages(self, method_dotted_names):
       passed = []
       for dotted_name in sorted(method_dotted_names):
           if self.capture:
               self.capture.err.writeorg('.')
           # XXX should we create a build_function_view instead?
           parent_dotted_name, _ = split_of_last_part(dotted_name)
           sibling_dotted_names = self.namespace_tree[parent_dotted_name]
           tag = H.Content(self.build_callable_view(dotted_name))
           nav = self.build_navigation(dotted_name, False)
           reltargetpath = "api/%s.html" % (dotted_name,)
           self.linker.set_link(dotted_name, reltargetpath)
           title = '%s API' % (dotted_name,)
->         rev = self.get_revision(dotted_name)
           if rev:
               title += ' [rev. %s]' % (rev,)
           self.write_page(title, reltargetpath, tag, nav)
       return passed
apigen/htmlgen.py - line 748
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
   def get_revision(self, dotted_name):
->     return get_package_revision(self.projroot)
       if dotted_name in self._revcache:
           return self._revcache[dotted_name]
       obj = get_obj(self.dsa, self.pkg, dotted_name)
       rev = None
       try:
           sourcefile = inspect.getsourcefile(obj)
       except TypeError:
           pass
       else:
           if sourcefile is not None:
               if sourcefile[-1] in ['o', 'c']:
                   sourcefile = sourcefile[:-1]
               wc = py.path.svnwc(sourcefile)
               if wc.check(versioned=True):
                   rev = wc.info().created_rev
       rev = rev or self.get_proj_revision()
       self._revcache[dotted_name] = rev
       return rev
apigen/htmlgen.py - line 175
173
174
175
176
177
178
179
180
181
182
183
184
185
186
   def get_package_revision(packageroot, _revcache={}):
       try:
->         rev = _revcache[packageroot]
       except KeyError:
           wc = py.path.svnwc(packageroot)
           rev = None
           if wc.check(versioned=True):
               rev = py.path.svnwc(packageroot).info().rev
           else:
               rev = 'unknown'
           _revcache[packageroot] = rev
       if packageroot.basename == "py": 
           assert rev is not None
       return rev