Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(457)

Issue 630043: code review 630043: godoc: revert change 5089, per gri's instructions (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 2 months ago by rsc
Modified:
15 years, 2 months ago
Reviewers:
CC:
gri, golang-dev
Visibility:
Public.

Description

godoc: revert change 5089, per gri's instructions

Patch Set 1 #

Patch Set 2 : code review 630043: godoc: revert change 5089, per gri's instructions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -28 lines) Patch
M lib/godoc/search.txt View 3 chunks +3 lines, -4 lines 0 comments Download
M src/cmd/godoc/godoc.go View 2 chunks +3 lines, -24 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello gri (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years, 2 months ago (2010-03-20 00:46:16 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=0810a9dcec66 *** godoc: revert change 5089, per gri's instructions R=gri CC=golang-dev http://codereview.appspot.com/630043
15 years, 2 months ago (2010-03-20 00:46:21 UTC) #2
gri
15 years, 2 months ago (2010-03-20 04:43:42 UTC) #3
LGTM

On Fri, Mar 19, 2010 at 4:46 PM, <rsc@golang.org> wrote:

> Reviewers: gri,
>
> Message:
> Hello gri (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change.
>
>
> Description:
> godoc: revert change 5089, per gri's instructions
>
> Please review this at http://codereview.appspot.com/630043/show
>
> Affected files:
>  M lib/godoc/search.txt
>  M src/cmd/godoc/godoc.go
>
>
> Index: lib/godoc/search.txt
> ===================================================================
> --- a/lib/godoc/search.txt
> +++ b/lib/godoc/search.txt
> @@ -1,5 +1,4 @@
> -QUERY
> -{Query}
> +QUERY = {Query}
>
>  {.section Accurate}
>  {.or}
> @@ -22,7 +21,7 @@
>  {.repeated section Files}
>  {.repeated section Groups}
>  {.repeated section Infos}
> -       {File.Path}:{@|infoLine}
> +       {File.Path|url-src}:{@|infoLine}
>  {.end}
>  {.end}
>  {.end}
> @@ -37,7 +36,7 @@
>  {.repeated section Files}
>  {.repeated section Groups}
>  {.repeated section Infos}
> -       {File.Path}:{@|infoLine}
> +       {File.Path|url-src}:{@|infoLine}
>  {.end}
>  {.end}
>  {.end}
> Index: src/cmd/godoc/godoc.go
> ===================================================================
> --- a/src/cmd/godoc/godoc.go
> +++ b/src/cmd/godoc/godoc.go
> @@ -1375,6 +1375,9 @@
>                                nwords, nspots := index.Size()
>                                log.Stderrf("index updated (%gs, %d unique
> words, %d spots)", secs, nwords, nspots)
>                        }
> +                       log.Stderrf("bytes=%d footprint=%d\n",
> runtime.MemStats.HeapAlloc, runtime.MemStats.InusePages<<12)
> +                       runtime.GC()
> +                       log.Stderrf("bytes=%d footprint=%d\n",
> runtime.MemStats.HeapAlloc, runtime.MemStats.InusePages<<12)
>                }
>                time.Sleep(1 * 60e9) // try once a minute
>        }
> @@ -1394,29 +1397,5 @@
>
>  func (s *IndexServer) Lookup(query *Query, result *SearchResult) os.Error
> {
>        *result = lookup(query.Query)
> -       if hit := result.Hit; hit != nil {
> -               // the hitlists contain absolute server file paths;
> -               // convert them into relative paths on the server
> -               // because the client usually has a different file
> -               // mapping
> -               mapHitList(hit.Decls)
> -               mapHitList(hit.Others)
> -       }
>        return nil
>  }
> -
> -
> -func mapHitList(list HitList) {
> -       for _, prun := range list {
> -               for _, frun := range prun.Files {
> -                       // convert absolute file paths to relative paths
> -                       f := frun.File
> -                       if f != nil && len(f.Path) > 0 && f.Path[0] == '/'
> {
> -                               f.Path = relativePath(f.Path)
> -                       }
> -                       // TODO(gri) convert SpotInfos containing snippets
> -                       //           so that the line number is available
> -                       //           on the client side
> -               }
> -       }
> -}
>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b