remove \.py(c|o)$ from hgignore, use a push hook instead

RESOLVED INVALID

Status

Developer Services
Mercurial: hg.mozilla.org
RESOLVED INVALID
6 years ago
4 years ago

People

(Reporter: Josh Aas, Unassigned)

Tracking

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1061] )

(Reporter)

Description

6 years ago
I think we should remove '\.py(c|o)$' from hgignore and use a push hook to stop those files from getting into the tree.

Today my build was broken because a .pyc file got into my src dir four months ago and I didn't notice because 'hg purge' didn't clean it out as I'd expect. I don't use 'hg purge --all' because I don't want to blow away my mozconfigs.

I expect 'hg purge' to clean my source tree except for my mozconfig and objdir, maybe some other tooling files. Right now it is configured to guard commits, and this leads to problems. We should use hooks to guard commits.
I don't think this is a RelEng bug. Any developer can change the .hgignore files and write a hook to reject pushes that have pyc/pyo files. Once the hook is written, you can file a bug in mozilla.org: Server Ops for deployment.
Component: Release Engineering → Hg: Customizations
QA Contact: release → hg.customizations
I'm opposed to this. Having .pyc files show up in "hg status" is annoying. I don't want to see those, I just want to see actual changes.
(In reply to Ted Mielczarek [:ted] (away until ~March 7) from comment #2)
> I'm opposed to this. Having .pyc files show up in "hg status" is annoying. I
> don't want to see those, I just want to see actual changes.

On the other hand, as we discovered today, it leaves cruft around, and can lead to unpleasing surprises.
(Assignee)

Updated

5 years ago
Product: mozilla.org → Release Engineering

Comment 4

4 years ago
Python is what's leaving cruft around (and more to the point, not invalidating it properly).

The proposed change would "fix" things for users who for some reason frequently run "hg purge" but not "hg purge --all", while making "status" and "add ." unusable for everyone.
(Assignee)

Updated

4 years ago
Product: Release Engineering → Developer Services

Updated

4 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/245]

Updated

4 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/245] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1051] [kanban:engops:https://kanbanize.com/ctrl_board/6/245]

Updated

4 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1051] [kanban:engops:https://kanbanize.com/ctrl_board/6/245] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1059] [kanban:engops:https://kanbanize.com/ctrl_board/6/245]

Updated

4 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1059] [kanban:engops:https://kanbanize.com/ctrl_board/6/245] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1061] [kanban:engops:https://kanbanize.com/ctrl_board/6/245]
(Assignee)

Updated

4 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1061] [kanban:engops:https://kanbanize.com/ctrl_board/6/245] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1061]

Comment 5

4 years ago
Ignoring .pyc files is a build system bug. There is another bug on file somewhere. I'm too lazy to find it.

This shouldn't be enforced at the version control level.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.