aptivate / dye

Deploy Your Environment using fabfile.org
http://aptivate.org/
GNU General Public License v3.0
13 stars 9 forks source link

bootstrap.py *still* blows away changes to editable git checkouts #45

Open qris opened 10 years ago

qris commented 10 years ago

Add an editable git checkout to your deploy/pip_packages.txt:

-e git+https://github.com/aptivate/cmsbootstrap.git@2ccf433e101ec9e7eef7ccc4a6c16cc8c5eb59f6#egg=cmsbootstrap

Run deploy/bootstrap.py.

Make changes to the editable code, for example:

echo 'test {}' >> django/website/.ve/src/cmsbootstrap/cmsbootstrap/static/sass/cmsbootstrap.scss

Touch pip_packages.txt and run bootstrap again:

touch deploy/pip_packages.txt
deploy/bootstrap.py

Check what happened to your change:

grep test django/website/.ve/src/cmsbootstrap/cmsbootstrap/static/sass/cmsbootstrap.scss

And it's gone!

Silently blowing away changes to an editable repo is not cool.

foobacca commented 10 years ago

I guess this must be due to pip. I agree it's not cool and ideally it would be fixed in pip, but as that's not currently the case we could add some code so that bootstrap could check each checkout in .ve/src/ and if git status --porcelain showed any changes we could check if the user wanted to continue.

Also you title this bug report "still blows away" - was there a previous bug report I missed where we thought it was fixed? Or are you referring to the change where we stopped blowing away the entire virtualenv?

qris commented 10 years ago

When we had the big debate about using git submodule or pip -e, I expressed a preference for using submodules because they wouldn't be blown away automatically.

I think someone said that was impossible at the time, and I should just use pip -e. It's clearly not impossible.