← Back to team overview

quickly-talk team mailing list archive

Re: Overwrite branch

 

Le 27/06/2012 01:06, Michael Terry a écrit :
Hello! I wrote a branch [1] to implement what I thought the results of past discussions was (see "Project root refactoring" and "Scope of upgrade command" threads).

Basically, the thread enforces the idea that setup.py, bin/, and python_lib/ are quickly-owned files (well, the bottom part of setup.py is user-owned).

That means that every time the user runs a new version of quickly, it will automatically overwrite the parts that are quickly-owned with the latest version.

This saves us bucket loads of effort trying to sed files every time we come up with an incremental improvement. Being so cautious is also a frequent difficulty in reviewing branches where a drive by contributor doesn't realize the possible upgrade concerns (or even quickly developers ourselves forget). Basically, it lets us make changes quicker and with more confidence.

Tony was kind enough to review the merge a bit and suggested we talk about this on the mailing list. I believe his big concerns were around when users want to workaround quickly bugs or features they don't like. They may patch quickly-owned files and lose the changes.

My answer is that after setup.py launches your module's python.main(), you can do whatever you like in that function. So as long as we don't crash in bin/python-name or setup.py, you can adjust behavior in your own code. There shouldn't ever be a reason to touch quickly-owned code.

Alternatively, the user could bzr revert the changes manually.

[1] https://code.launchpad.net/~mterry/quickly/overwrite/+merge/111315 <https://code.launchpad.net/%7Emterry/quickly/overwrite/+merge/111315>

Can we generate some kind of sha of the files (like previous versions) and bail out (asking if the user want to proceed the upgrade or block the command for now) if the file to overwrite doesn't correspond to the blessed version? For the first round, as we probably don't want to list all the file sha checksum of files we supported in the past, we just ask telling "those files are now considered considered as being owned by Quickly, please be aware that we will upgrade them automatically for now on. You changes are still saved and you can revert them to move your code in other files in..."

What do you think? This will avoid making reverts on user code without him being warned.
Didier

Follow ups

References