If you hg update your client to an earlier CL, then
hg sync will move you back to tip if it pulls anything in,
but it will leave you where you are if it doesn't pull anything in.
That's confusing: make hg sync always update to tip.
R=golang-dev, bradfitz, r, dsymonds
CC=golang-dev
https://golang.org/cl/10456044
Normally the codereview plugin disables adding new commits
when not using the submit command. Unfortunately this makes
it impossible to use the Mercurial Queues extension at the
same time.
A feature called "Phases" was introduced in Mercurial 2.1
that allows marking commits as being secret; this means
they will never be pushed to the upstream repository.
We can take advantage of this feature to allow the use of
Mercurial Queues if the mq.secret option has been set in
hgrc(5) and a recent version of Mercurial is used.
R=golang-dev, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/7398055
This should do it for the release.
There was a new data set pushed out a couple of days ago.
Fixes#4553.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8621044
- removed gratuitous empty lines that creeped into command line output
- changed comment color to a dark green so that links don't visually melt into them
- removed some TODOs
- updated doc.go
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8108044
- convert all formatters that require a *token.FileSet to
consistenly use a *PageInfo as first argument instead
- adjust templates correspondingly
- fix outstanding bug from previous CL 8005044
Going forward, with this change the affected functions have
access to the full page "context" (PageInfo), not just the
respective file set. This will permit better context-dependent
formatting in the future.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7860049
The gofmt function was returning a string, which isn't the right type.
Three cheers for dynamic typing.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7917044
- A note doesn't have to be in the first
comment of a comment group anymore, and
several notes may appear in the same comment
group (e.g., it is fairly common to have a
TODO(uid) note immediately following another
comment).
- Define a doc.Note type which also contains
note uid and position info.
- Better formatting in godoc output. The position
information is not yet used, but could be used to
locate the note in the source text if desired.
Fixes#4843.
R=r, cnicolaou
CC=gobot, golang-dev
https://golang.org/cl/7496048
Fixed package.txt and adjusted package.html to match
structure (swapped if branches).
Fixes#4861.
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/7714043
pkg/go/doc: move BUG notes from Package.Bugs to the general Package.Notes field.
Removing .Bugs would break existing code so it's left in for now.
R=gri, gri, gary.burd, dsymonds, rsc, kevlar
CC=golang-dev
https://golang.org/cl/7341053
Added the command line flag -ex to godoc to print examples in
text output.
Samples from the generated output:
$ godoc -ex strings Index
...
func Index(s, sep string) int
Index returns the index of the first instance of sep in s, or -1 if sep
is not present in s.
Example:
fmt.Println(strings.Index("chicken", "ken"))
fmt.Println(strings.Index("chicken", "dmr"))
// Output:
// 4
// -1
...
$ godoc -ex container/heap
...
package heap
import "container/heap"
Package heap provides heap operations for any type that implements
heap.Interface. A heap is a tree with the property that each node is the
minimum-valued node in its subtree.
Example:
// This example demonstrates an integer heap built using the heap interface.
package heap_test
import (
"container/heap"
"fmt"
...
Example:
// This example demonstrates a priority queue built using the heap interface.
package heap_test
import (
"container/heap"
"fmt"
)
...
Fixes#3587.
R=golang-dev, minux.ma, adg, rsc, gri
CC=golang-dev
https://golang.org/cl/7356043
Also:
- faster code for example extraction
- simplify handling of command documentation:
all "main" packages are treated as commands
- various minor cleanups along the way
For commands written in Go, any doc.go file containing
documentation must now be part of package main (rather
then package documentation), otherwise the documentation
won't show up in godoc (it will still build, though).
For commands written in C, documentation may still be
in doc.go files defining package documentation, but the
recommended way is to explicitly ignore those files with
a +build ignore constraint to define package main.
Fixes#4806.
R=adg, rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7333046
If Python blocks in the SSL handshake it seems to be
completely uninterruptible, and I've been seeing it
block for at least hours recently. I don't know if the
problem is on the client side or the server side or
somewhere in the network, but setting the timeout
at least means you're guaranteed a new shell prompt
(after printing some errors).
R=golang-dev, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/7337048
Add support for displaying the notes of the form 'MARKER(userid): comment' now collected by the go/doc package. Any two or more uppercase letters are recognised as a marker.
R=gri, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7334044
Putting it before the Index (where it is now) is wrong:
we don't even know what's in the package yet.
Fixes#4484.
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/6868071
The new version of rietveld pushed 1.5 hours ago
requires HTTPS now, otherwise it issues a 301
to HTTPS which we barfed on.
R=golang-dev
CC=golang-dev
https://golang.org/cl/6782135
In recent Python versions .reason is a read-only property that simply gives you the msg value.
Fixes#4024
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6545052
For golang.org I intend to rewrite the jquery link in godoc.html
to point to the Google-hosted jquery.js.
R=dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6589071
The decorator hides the number of function arguments from Mercurial,
so Mercurial cannot give proper error messages about commands
invoked with the wrong number of arguments.
Left a 'dummy' hgcommand decorator in place as a way to document
what functions are hg commands, and just in case we need some other
kind of hack in the future.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/6488059
Some browsers (e.g. IE9) ignore the case of 'id' attributes
which can lead to conflicts. Prefix non-generated 'id's with
"pkg-" to make them different from any generated attribute.
Also: Added missing entry for "Other packages" to top-level
index.
Fixes#3851.
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/6449105
We explicitly use plainformatter to avoid the
user's debug setting changing our behavior.
Fixes#3603.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6201069
Docstrings were not being set for the wrapper
functions returned by the hgcommand decorator.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6059043
In a browser with many open tabs, the tab titles become short
and uninformative because they all start with the same prefix
("Package ", "Directory ", etc.).
Permit use of shorter tab titles that start with the relevant
information first.
Fixes#3365.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5865056
srcLink includes the / now; adding another yields //,
which means something else entirely in URLs.
Fixes#3327.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5823060
We use the absence of a Title to detect the front page.
I can't find other pages without titles, so this seems reasonable.
R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5797076
Mercurial: the Python of version control systems.
Python: the Mercurial of programming languages.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5777066
If I click on links which should send you to source code (e.g. type, function, etc),
the link is to //src/... (instead of /src/...).
This causes a DNS resolution failure on the browser.
Quick fix is to remove the leading / from package.html
(since godoc.go src links automatically add a leading / as necessary).
Fixes#3193.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5730059
The motivation for this CL is to support $GOPATH well.
Since we already have a FileSystem interface, implement a
Plan 9-style name space. Bind each of the $GOPATH src
directories onto the $GOROOT src/pkg directory: now
everything is laid out exactly like a normal $GOROOT and
needs very little special case code.
The filter files are no longer used (by us), so I think they
can just be deleted. Similarly, the Mapping code and the
FileSystem interface were two different ways to accomplish
the same end, so delete the Mapping code.
Within the implementation, since FileSystem is defined to be
slash-separated, use package path consistently, leaving
path/filepath only for manipulating operating system paths.
I kept the -path flag, but I think it can be deleted too.
Fixes#2234.
Fixes#3046.
R=gri, r, r, rsc
CC=golang-dev
https://golang.org/cl/5711058
The main change is simple: Both the Directory and DirEntry
struct have an extra field 'HasPkg' indicating whether the
directory contains any package files. The remaining changes
are more comments and adjustments to the template files.
Fixes#3121.
R=golang-dev, bradfitz, sameer
CC=golang-dev
https://golang.org/cl/5699072
This is not the finished product,
but a good checkpoint from which to
proceed with further development.
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5571061
If this happens, something is misconfigured.
If we don't test for this explicitly, MatchAt ends
up calling itself recursively forever.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5576066
Compare:
http://swtch.com/junk/regexp0.html [old]
http://swtch.com/junk/regexp.html [new]
Especially for packages with large APIs, this makes the
overview more promiment, so that it can give the appropriate
context for reading the API list. This should help significantly
in packages with large APIs, like net, so that the first thing users
see is not a jumble of functions but an introduction to the package.
R=adg, gri, r, kevlar, dsymonds, rogpeppe
CC=golang-dev
https://golang.org/cl/5573068
Separating Method from Func made the code only more complicated
without adding much to the useability/readability of the API.
Reverted to where it was, but leaving the new method-specific
fields Orig and Level.
Former clients (godoc) of doc.Method only used the Func fields;
and because Func was embedded, no changes are needed with respect
to the removal of Method.
Changed type of Func.Recv from ast.Expr to string. This was a
long-standing TODO. Also implemented Func.Orig field (another TODO).
No further go/doc API changes are expected for Go 1.
R=rsc, r, r
CC=golang-dev
https://golang.org/cl/5577043
Also, disable server-side generation of TOC for commands as they would
only ever show Overview. The JS does a better job (for now).
Fixes#2732.
R=gri, dsymonds
CC=golang-dev
https://golang.org/cl/5558046