big package move

959 views
Skip to first unread message

Russ Cox

unread,
Sep 5, 2014, 5:05:54 PM9/5/14
to golang-dev
I am planning to rename all src/pkg/xxx files to just src/xxx on Monday. (golang.org/s/go14nopkg)

Mercurial is actually pretty good about keeping changes to modified files as they move around, so if you have pending work, it might just update fine when you sync after the move. Or it might not. If not, our apologies. 

The one thing that is likely to break is the assignment of files to CLs. Since that's built above Mercurial, it won't update for the renames. For example if you have CL 12345 with a change to src/pkg/flag/flag.go, Mercurial will move your changes to the renamed src/flag/flag.go, but you will have to run 'hg change 12345' to update the CL's file list yourself.

Russ

Russ Cox

unread,
Sep 6, 2014, 2:11:39 PM9/6/14
to golang-dev
If you want to see the impact, the CLs with the necessary changes are:

134530044 runtime/cgo: use just #include "textflag.h"
134560043 cmd/yacc: move cmd/yacc/expr to cmd/yacc/testdata/expr
134570043 build: adjustments for move from src/pkg to src

The first two can be submitted early. On Monday, I will submit the last one (which will break the build) and then immediately do the 'hg mv' to move everything (which will fix the build).

It is okay to keep working and submitting CLs throughout the weekend. I expect to make the change on Monday around 10am NYC time. I will update this thread once it is all done.

Russ

Russ Cox

unread,
Sep 8, 2014, 12:15:22 AM9/8/14
to golang-dev
It's Monday for me, so I bumped this up a few hours. It's done.

Go contributors working in the main repository will need to do three things to update their trees:

1. Run “hg sync” to get the changes.

2. Look at $GOROOT/src/pkg, which is likely to be full of untracked files.
Copy those you want to keep elsewhere, and then rm -rf $GOROOT/src/pkg.

3. Code review metadata will still refer to the old files.
Reassign files in pending CLs by running “hg change ###”.

Russ

Nathan Youngman

unread,
Sep 8, 2014, 12:42:52 AM9/8/14
to golan...@googlegroups.com

Thanks Russ.

I don't know if this is actually a problem, but there are some untracked files that show up when switching between release and default branches (after recompiling Go).

$ hg update default

$ hg status
? src/pkg/runtime/zaexperiment.h
? src/pkg/runtime/zalg_darwin_amd64.c
? src/pkg/runtime/zasm_darwin_amd64.h
? src/pkg/runtime/zchan_darwin_amd64.c
? src/pkg/runtime/zcomplex_darwin_amd64.c
? src/pkg/runtime/zcpuprof_darwin_amd64.c
? src/pkg/runtime/zgoarch_amd64.go
? src/pkg/runtime/zgoos_darwin.go
? src/pkg/runtime/zhashmap_darwin_amd64.c
? src/pkg/runtime/ziface_darwin_amd64.c
? src/pkg/runtime/zlfstack_darwin_amd64.c
? src/pkg/runtime/zmalloc_darwin_amd64.c
? src/pkg/runtime/zmprof_darwin_amd64.c
? src/pkg/runtime/znetpoll_darwin_amd64.c
? src/pkg/runtime/zrdebug_darwin_amd64.c
? src/pkg/runtime/zruntime1_darwin_amd64.c
? src/pkg/runtime/zruntime_defs_darwin_amd64.go
? src/pkg/runtime/zsema_darwin_amd64.c
? src/pkg/runtime/zsigqueue_darwin_amd64.c
? src/pkg/runtime/zslice_darwin_amd64.c
? src/pkg/runtime/zstring_darwin_amd64.c
? src/pkg/runtime/zsymtab_darwin_amd64.c
? src/pkg/runtime/zsys_darwin_amd64.s
? src/pkg/runtime/ztime_darwin_amd64.c
? src/pkg/runtime/zversion.go

(after all.bash)

$ hg status
? src/runtime/zaexperiment.h
? src/runtime/zasm_darwin_amd64.h
? src/runtime/zgoarch_amd64.go
? src/runtime/zgoos_darwin.go
? src/runtime/zruntime_defs_darwin_amd64.go
? src/runtime/zsys_darwin_amd64.s
? src/runtime/zversion.go

Nathan.

Nathan Youngman

unread,
Sep 8, 2014, 12:45:37 AM9/8/14
to golan...@googlegroups.com

I missed an "hg update release" in the second part there.

Presumably generated files that cause no actual issues? Just some hg status clutter.

Nathan.

Dave Cheney

unread,
Sep 8, 2014, 12:48:36 AM9/8/14
to Nathan Youngman, golang-dev
Nathan,

Please send a CL to update the .hgignore file in the root of the repo.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Russ Cox

unread,
Sep 8, 2014, 12:50:21 AM9/8/14
to Dave Cheney, Nathan Youngman, golang-dev
Please do NOT send a CL to update .hgignore. It is working correctly. When you switch from tip to release and back you will need to do some cleaning. hg status is showing you that.

Nathan Youngman

unread,
Sep 8, 2014, 12:50:27 AM9/8/14
to Dave Cheney, golang-dev

Good call Dave.

I'm heading to bed here, but I can submit a CL tomorrow evening if nobody has gotten to it by then. 

Adding it to my to do list.

Ciao,
Nathan.

--
Nathan Youngman
Email: n...@nathany.com
Web: http://www.nathany.com

Andrew Gerrand

unread,
Sep 8, 2014, 12:57:39 AM9/8/14
to Russ Cox, Dave Cheney, Nathan Youngman, golang-dev
The "hg purge" command is useful for cleaning up files like this. Use with care.


On 8 September 2014 14:50, Russ Cox <r...@golang.org> wrote:
Please do NOT send a CL to update .hgignore. It is working correctly. When you switch from tip to release and back you will need to do some cleaning. hg status is showing you that.

Andrew Gerrand

unread,
Sep 8, 2014, 2:04:32 AM9/8/14
to Russ Cox, golang-dev
On 8 September 2014 14:15, Russ Cox <r...@golang.org> wrote:
Go contributors working in the main repository will need to do three things to update their trees:

1. Run “hg sync” to get the changes.

2. Look at $GOROOT/src/pkg, which is likely to be full of untracked files.
Copy those you want to keep elsewhere, and then rm -rf $GOROOT/src/pkg.

3. Code review metadata will still refer to the old files.
Reassign files in pending CLs by running “hg change ###”.

When we release Go 1.4 users updating their source distributions will likely trip over having stale zfiles in src/pkg/syscall, at least.

Should we put a test for the 'pkg' directory in make.bash or go_bootstrap to remind users to clean up their tree? That would relieve some support burden at launch time. We would remove the test after the release is cut.

Andrew

Russ Cox

unread,
Sep 8, 2014, 2:05:51 AM9/8/14
to Andrew Gerrand, golang-dev
On Mon, Sep 8, 2014 at 2:03 AM, Andrew Gerrand <a...@golang.org> wrote:
When we release Go 1.4 users updating their source distributions will likely trip over having stale zfiles in src/pkg/syscall, at least.

Should we put a test for the 'pkg' directory in make.bash or go_bootstrap to remind users to clean up their tree? That would relieve some support burden at launch time. We would remove the test after the release is cut.

You clearly haven't run make.bash yet.

Russ

Andrew Gerrand

unread,
Sep 8, 2014, 2:13:07 AM9/8/14
to Russ Cox, golang-dev

On 8 September 2014 16:05, Russ Cox <r...@golang.org> wrote:
You clearly haven't run make.bash yet.

Hah. Actually, before running make.bash I cleaned up my tree as per your instructions, and so I didn't see anything along those lines. :-)

Alexandre Cesaro

unread,
Sep 10, 2014, 1:19:16 PM9/10/14
to golan...@googlegroups.com, r...@golang.org
I have an issue with the new files of my CL. I did "hg sync" and updated the CL using "hg change 101330049" but when I try to upload I get an error:

abort: src/mime/header.go@ca2c8c76aed9: not found in manifest!


Mercurial thinks this new file is an already existing file that has been modified:

$ hg status
...
M src/mime/header.go
...


Any idea how I can fix this?

Ian Lance Taylor

unread,
Sep 10, 2014, 1:47:24 PM9/10/14
to Alexandre Cesaro, golang-dev, Russ Cox
On Wed, Sep 10, 2014 at 10:19 AM, Alexandre Cesaro
<alexandr...@gmail.com> wrote:
>
> I have an issue with the new files of my CL. I did "hg sync" and updated the
> CL using "hg change 101330049" but when I try to upload I get an error:
>
> abort: src/mime/header.go@ca2c8c76aed9: not found in manifest!
>
> Mercurial thinks this new file is an already existing file that has been
> modified:
>
> $ hg status
> ...
> M src/mime/header.go
> ...
>
> Any idea how I can fix this?

You could not worry about the problem, and just delete the existing CL
and create a new one.

Ian

Russ Cox

unread,
Sep 11, 2014, 12:11:23 PM9/11/14
to Ian Lance Taylor, Alexandre Cesaro, golang-dev
I would copy what you want to save, delete the whole Mercurial checkout, and start over. Sometimes Mercurial gets corrupted. Sometimes it is Mercurial's fault, sometimes not. There's not much you can do once it happens.

Russ

Reply all
Reply to author
Forward
0 new messages