Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No more egg-info directories in source directory

40 views
Skip to first unread message

Gregory Szorc

unread,
Sep 4, 2012, 2:13:04 PM9/4/12
to dev-pl...@lists.mozilla.org
I just landed a change to how the Python virtualenv is populated during
configure. The short story is there are no more .egg-info/ directories
created in the source directory as part of virtualenv population.

These directories are no longer ignored by .hgignore and .gitignore, so
the next time you run |hg status| or |git status| you may see a lot of
untracked files.

Instructions for removing the cruft are available in the commit message
at https://hg.mozilla.org/integration/mozilla-inbound/rev/d034d1924fc7

Reprinted here for convenience:

$ hg status -u | grep .egg-info | xargs rm -rf
$ git ls-files -o '*.egg-info*' | xargs rm -rf

Blair McBride

unread,
Sep 5, 2012, 3:14:34 AM9/5/12
to dev-pl...@lists.mozilla.org
On 5/09/2012 6:13 a.m., Gregory Szorc wrote:
> $ hg status -u | grep .egg-info | xargs rm -rf
> $ git ls-files -o '*.egg-info*' | xargs rm -rf

Those of you on Windows will notice this doesn't work, thanks to
Windows-style paths. The following will:

$ hg status -un | grep .egg-info | sed 's/\\/\//g' | xargs rm -rf
$ git ls-files -o '*.egg-info*' | sed 's/\\/\//g' | xargs rm -rf


- Blair

Neil

unread,
Sep 5, 2012, 4:30:40 AM9/5/12
to
Or you could use tr \\\\ / instead. Also I'm not sure you'll need it for
git, because that's probably the msys version, and I'm going to
extrapolate that it uses forward slashes. (Sadly there's no true msys
version of python, which would have avoided all of these problems.)

--
Warning: May contain traces of nuts.

Dao

unread,
Sep 5, 2012, 6:04:37 AM9/5/12
to
On 05.09.2012 09:14, Blair McBride wrote:
> On 5/09/2012 6:13 a.m., Gregory Szorc wrote:
>> $ hg status -u | grep .egg-info | xargs rm -rf
>> $ git ls-files -o '*.egg-info*' | xargs rm -rf
>
> Those of you on Windows will notice this doesn't work, thanks to
> Windows-style paths. The following will:
>
> $ hg status -un | grep .egg-info | sed 's/\\/\//g' | xargs rm -rf

Or use hg purge if there are no other uncommitted files.

Mark Hammond

unread,
Sep 5, 2012, 7:39:33 PM9/5/12
to
Another option it to use the obscure hg option:

[ui]
slash=true

This will cause hg to output most path names using a forward slash
character. This is useful to me as it means I can copy/paste output
from hg back into bash and have things work as expected.

As I only use bash with the mozilla-central clones, I've added this to
the .hg/hgrc files in individual repos, although I believe it can also
be set globally if you want to enable it once but have it work everywhere...

Mark
0 new messages