|
|
DescriptionAdds bin/ to .hgignore to support setting $GOBIN to $GOROOT/bin
Patch Set 1 #
Total comments: 4
MessagesTotal messages: 9
I know this isn't probably a typical case, but its a fairly simple change that makes for easier development of multiple versions of Go on the same machine.
Sign in to reply to this message.
http://codereview.appspot.com/1699046/diff/1/2 File .hgignore (right): http://codereview.appspot.com/1699046/diff/1/2#newcode43 .hgignore:43: ^bin/ For me, it's the typical case. Since I have multiple OSs and projects, I use $GOBIN set to $GOROOT/bin for Linux, etc. For Windows, I use %GOBIN% set to %GOROOT%\bin. Allow both the forward slash and backslash as a path separator. For example, on Windows, with some omissions due to an incomplete port: P:\go>hg status ? bin\6nm.exe ? bin\8a.exe ? bin\8c.exe ? bin\8g.exe ? bin\8l.exe ? bin\ebnflint ? bin\godefs.exe ? bin\gofmt ? bin\gomake ? bin\gopack.exe ? bin\gotest ? bin\goyacc ? bin\hgpatch ? bin\quietgcc Peter
Sign in to reply to this message.
http://codereview.appspot.com/1699046/diff/1/2 File .hgignore (right): http://codereview.appspot.com/1699046/diff/1/2#newcode43 .hgignore:43: ^bin/ On 2010/06/21 14:12:49, PeterGo wrote: > For me, it's the typical case. Since I have multiple OSs and projects, I use > $GOBIN set to $GOROOT/bin for Linux, etc. For Windows, I use %GOBIN% set to > %GOROOT%\bin. Allow both the forward slash and backslash as a path separator. > For example, on Windows, with some omissions due to an incomplete port: > > P:\go>hg status > ? bin\6nm.exe > ? bin\8a.exe > ? bin\8c.exe > ? bin\8g.exe > ? bin\8l.exe > ? bin\ebnflint > ? bin\godefs.exe > ? bin\gofmt > ? bin\gomake > ? bin\gopack.exe > ? bin\gotest > ? bin\goyacc > ? bin\hgpatch > ? bin\quietgcc > > Peter > Hrm, there aren't any other Windows specific globs or regexps in the list and those don't seem to be appearing in your listing either. Do you have anything compiled to pkg/ that isn't appearing in the list? If so, I'm wondering if hg doesn't do some normalization of paths before checking against the ignore file? I'm happy to add the win-specific regexp, but I'm not sure how that fits in the grand scheme of things.
Sign in to reply to this message.
http://codereview.appspot.com/1699046/diff/1/2 File .hgignore (right): http://codereview.appspot.com/1699046/diff/1/2#newcode43 .hgignore:43: ^bin/ The Mercurial documentation says that it uses Python's regexp engine internally. 7.4.2. Mercurial: The Definitive Guide. By experiment, it also appears to use Python's OS dependent os.pathsep, which means your patch works for Windows and other Python supported OSs too.
Sign in to reply to this message.
On 2010/06/21 15:41:29, PeterGo wrote: > http://codereview.appspot.com/1699046/diff/1/2 > File .hgignore (right): > > http://codereview.appspot.com/1699046/diff/1/2#newcode43 > .hgignore:43: ^bin/ > The Mercurial documentation says that it uses Python's regexp engine internally. > 7.4.2. Mercurial: The Definitive Guide. By experiment, it also appears to use > Python's OS dependent os.pathsep, which means your patch works for Windows and > other Python supported OSs too. That's great. Do you mind dropping the line in your .hgignore file and see if it works as you'd expect? I don't have a Windows machine to test right now, and I'd be much happier if we know it works in practice on both platforms.
Sign in to reply to this message.
http://codereview.appspot.com/1699046/diff/1/2 File .hgignore (right): http://codereview.appspot.com/1699046/diff/1/2#newcode43 .hgignore:43: ^bin/ I tested your patch successfully using Windows XP and Windows 7, using the Windows command shell and the MSYS bash command shell.
Sign in to reply to this message.
On Mon, Jun 21, 2010 at 6:34 PM, <go.peter.90@gmail.com> wrote: > > http://codereview.appspot.com/1699046/diff/1/2 > File .hgignore (right): > > http://codereview.appspot.com/1699046/diff/1/2#newcode43 > .hgignore:43: ^bin/ > I tested your patch successfully using Windows XP and Windows 7, using > the Windows command shell and the MSYS bash command shell. > > http://codereview.appspot.com/1699046/show Great, thank you!
Sign in to reply to this message.
LGTM
Sign in to reply to this message.
*** Submitted as http://code.google.com/p/go/source/detail?r=97862ce15d1c *** hgignore: adds bin/ to support setting $GOBIN to $GOROOT/bin R=PeterGo, adg CC=golang-dev, jnw http://codereview.appspot.com/1699046 Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.
|